From: Stoiko Ivanov Date: Fri, 12 Jun 2020 09:14:38 +0000 (+0200) Subject: fix #2796: debian/postinst: check for existing /etc/aliases X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=0bbe789c6a5bfeb0ab5717bab087b6aede422698 fix #2796: debian/postinst: check for existing /etc/aliases Signed-off-by: Stoiko Ivanov Signed-off-by: Thomas Lamprecht --- diff --git a/debian/postinst b/debian/postinst index 5a19c69..7bd635a 100644 --- a/debian/postinst +++ b/debian/postinst @@ -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