]> git.proxmox.com Git - pve-common.git/blobdiff - debian/postinst
add postinst hook to fix /etc/aliases whitespace error
[pve-common.git] / debian / postinst
diff --git a/debian/postinst b/debian/postinst
new file mode 100644 (file)
index 0000000..5a19c69
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
+case "$1" in
+  configure)
+    if test -n "$2"; then
+
+        # TODO: remove once PVE 7.0 is released
+        if dpkg --compare-versions "$2" 'lt' '6.0-5'; then
+            sed -E -i -e 's/^www:(\w)/www: \1/' /etc/aliases
+       fi
+    fi
+    ;;
+
+esac
+
+exit 0