[pve-devel] [PATCH manager] d/postinst: make deb-systemd-invoke non-fatal

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Apr 11 12:10:48 CEST 2024


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 at proxmox.com>
---
 debian/postinst | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/debian/postinst b/debian/postinst
index 6138ef6d0..2799f581c 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -123,11 +123,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;;
 
@@ -199,7 +199,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
-- 
2.39.2





More information about the pve-devel mailing list