all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH ha-manager] d/postinst: make deb-systemd-invoke non-fatal
Date: Thu, 11 Apr 2024 12:10:44 +0200	[thread overview]
Message-ID: <20240411101044.304124-1-f.gruenbichler@proxmox.com> (raw)

else this can break an upgrade for unrelated reasons.

this also mimics debhelper behaviour more (which we only not use here because
of lack of reload support) - restructured the snippet to be more similar with
an explicit `if` as well.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
 debian/pve-ha-manager.postinst | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/debian/pve-ha-manager.postinst b/debian/pve-ha-manager.postinst
index 94ab797..5c8f0cd 100644
--- a/debian/pve-ha-manager.postinst
+++ b/debian/pve-ha-manager.postinst
@@ -5,11 +5,13 @@ set -e
 #DEBHELPER#
 
 if [ "$1" = "triggered" ]; then
-    systemctl --quiet is-active pve-ha-lrm.service &&
-      deb-systemd-invoke reload-or-try-restart pve-ha-lrm.service
+    if systemctl --quiet is-active pve-ha-lrm.service; then
+      deb-systemd-invoke reload-or-try-restart pve-ha-lrm.service || true
+    fi
 
-    systemctl --quiet is-active pve-ha-crm.service &&
-      deb-systemd-invoke reload-or-try-restart pve-ha-crm.service
+    if systemctl --quiet is-active pve-ha-crm.service; then
+      deb-systemd-invoke reload-or-try-restart pve-ha-crm.service || true
+    fi
 fi
 
 exit 0
-- 
2.39.2





             reply	other threads:[~2024-04-11 10:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-11 10:10 Fabian Grünbichler [this message]
2024-04-17 14:56 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240411101044.304124-1-f.gruenbichler@proxmox.com \
    --to=f.gruenbichler@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal