]> git.proxmox.com Git - pve-common.git/commitdiff
fix #2796: debian/postinst: check for existing /etc/aliases
authorStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 12 Jun 2020 09:14:38 +0000 (11:14 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 15 Jun 2020 13:38:34 +0000 (15:38 +0200)
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
debian/postinst

index 5a19c69bb4b60204e95a9b8ae916261cf63eab4d..7bd635a7c6bc70fcea39d1568776d878102b5585 100644 (file)
@@ -9,7 +9,7 @@ case "$1" in
     if test -n "$2"; then
 
         # TODO: remove once PVE 7.0 is released
-        if dpkg --compare-versions "$2" 'lt' '6.0-5'; then
+        if dpkg --compare-versions "$2" 'lt' '6.0-5' && [ -e /etc/aliases ]; then
             sed -E -i -e 's/^www:(\w)/www: \1/' /etc/aliases
        fi
     fi