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

Emmanuel Kasper e.kasper at proxmox.com
Mon Jul 17 14:50:26 CEST 2017


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

Our other packages are doing this manually, or automatically
when the dh_systemd_enable helpers generated a postinst,
but this was missing here.
---
 changes since V1:
 * move the unmasking in the configure step, since this is the parameter
  called on install

 debian/postinst | 2 ++
 1 file changed, 2 insertions(+)

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





More information about the pve-devel mailing list