[pve-devel] [RFC PATCH] Fix #1446: allow pve-firewall package install twice in a row

Emmanuel Kasper e.kasper at proxmox.com
Thu Jul 13 16:31:59 CEST 2017


On packages removal (!= purge) systemd units are masked.
The postinst script has then to reenable this units at the
beginning of the script.

Our other packages are doing this manually, or automatically
when the dh_systemd_enable helpers generated a postinst,
but this was missing here.
---
 debian/postinst | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/debian/postinst b/debian/postinst
index e611f47..51063a5 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -2,6 +2,9 @@
 
 set -e
 
+# This will remove masks created by dh_systemd_enable on package removal.
+deb-systemd-helper unmask pve-firewall.service >/dev/null || true
+
 case "$1" in
     configure)
 	systemctl reload-or-restart pve-firewall
-- 
2.11.0





More information about the pve-devel mailing list