]> git.proxmox.com Git - pve-manager.git/commitdiff
add versioned postinst run of newaliases
authorStoiko Ivanov <s.ivanov@proxmox.com>
Wed, 23 Oct 2019 16:10:28 +0000 (18:10 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 23 Oct 2019 16:21:15 +0000 (18:21 +0200)
When installing from ISO '/etc/aliases' gets written correctly, however
postfix needs '/etc/aliases.db' (generated by running newaliases)
in order to work.

added to the postinst script to fix the issue for users having installed from
the ISO before this fix.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
debian/postinst

index 4e5a4a53bdd03e4f77266641c7cc153da45983a6..a5f4d7ac7616f19e2b816abd26f024304dced182 100755 (executable)
@@ -76,6 +76,13 @@ case "$1" in
            fi
        done
     fi
+
+    # TODO: remove once PVE 7.0 is released
+    if test -n "$2"; then
+       if dpkg --compare-versions "$2" 'lt' '6.0-11'; then
+           newaliases || true
+       fi
+    fi
     ;;
 
   abort-upgrade|abort-remove|abort-deconfigure)