check if a unit is masked before starting/restarting/reloading it, as else we get pretty ugly error messages during upgrade.
as "deb-systemd-helper --quiet was-enabled" differs from the "systemctl is-enabled" behaviour, the former returns true for masked units while the latter does not, we have to manually call systemctl, circumventing the deb helper. Signed-off-by: Thomas Lamprecht <t.lampre...@proxmox.com> Acked-by: Fabian Grünbichler <f.gruenbich...@proxmox.com> --- debian/postinst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/postinst b/debian/postinst index 58736a15..4f8b158e 100755 --- a/debian/postinst +++ b/debian/postinst @@ -71,7 +71,9 @@ case "$1" in else dh_action="start" fi - deb-systemd-invoke $dh_action "$unit" + if systemctl -q is-enabled "$unit"; then + deb-systemd-invoke $dh_action "$unit" + fi done fi -- 2.14.2 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel