]> git.proxmox.com Git - pve-manager.git/commitdiff
d/postinst: make deb-systemd-invoke non-fatal
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 11 Apr 2024 10:10:48 +0000 (12:10 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 17 Apr 2024 14:56:13 +0000 (16:56 +0200)
else this can break an upgrade for unrelated reasons (regular debhelper also
constructs the restart invocations like this, it even redirects output to
/dev/null)

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
debian/postinst

index c97c4fdbe20a79d196f235a70eab1557d20c733a..aba39904563b208f46469b646decdf6802d841f0 100755 (executable)
@@ -135,11 +135,11 @@ case "$1" in
     # the ExecStartPre doesn't triggers on service reload, so just in case
     pvecm updatecerts --silent || true
 
-    deb-systemd-invoke reload-or-try-restart pvedaemon.service
-    deb-systemd-invoke reload-or-try-restart pvestatd.service
-    deb-systemd-invoke reload-or-try-restart pveproxy.service
-    deb-systemd-invoke reload-or-try-restart spiceproxy.service
-    deb-systemd-invoke reload-or-try-restart pvescheduler.service
+    deb-systemd-invoke reload-or-try-restart pvedaemon.service || true
+    deb-systemd-invoke reload-or-try-restart pvestatd.service || true
+    deb-systemd-invoke reload-or-try-restart pveproxy.service || true
+    deb-systemd-invoke reload-or-try-restart spiceproxy.service || true
+    deb-systemd-invoke reload-or-try-restart pvescheduler.service || true
 
     exit 0;;
 
@@ -215,7 +215,7 @@ case "$1" in
                 dh_action="start"
             fi
             if systemctl -q is-enabled "$unit"; then
-                deb-systemd-invoke $dh_action "$unit"
+                deb-systemd-invoke $dh_action "$unit" || true
             fi
         done
     fi