]> git.proxmox.com Git - pve-common.git/blobdiff - debian/postinst
fix #2796: debian/postinst: check for existing /etc/aliases
[pve-common.git] / 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