From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] applied: [PATCH backup] d/postinst: restart when updating from older version
Date: Thu, 11 Mar 2021 09:58:21 +0100 [thread overview]
Message-ID: <20210311085821.10230-1-t.lamprecht@proxmox.com> (raw)
Else one has quite a terrible UX when installing from 1.0 ISO and
then upgrading to latest release..
commit 0ec79339f7aebf9 for the fix and some other details
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
---
As without this we always get a hanging upgrade when doing the insitial
upgrade after installation from the ISO, that's a no go, and restart is
better than user botching around, not really knowing what the issue is
and needing to do a stop+start or restart anyway.
debian/postinst | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/debian/postinst b/debian/postinst
index 7af49952..eb79851f 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -12,7 +12,14 @@ case "$1" in
# modeled after dh_systemd_start output
systemctl --system daemon-reload >/dev/null || true
if [ -n "$2" ]; then
- _dh_action=try-reload-or-restart
+ if dpkg --compare-versions "$2" 'lt' '1.0.7-1'; then
+ # there was an issue with reloading and systemd being confused in older daemon versions
+ # so restart instead of reload if upgrading from there, see commit 0ec79339f7aebf9
+ # FIXME: remove with PBS 2.1
+ _dh_action=try-restart
+ else
+ _dh_action=try-reload-or-restart
+ fi
else
_dh_action=start
fi
--
2.29.2
reply other threads:[~2021-03-11 8:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210311085821.10230-1-t.lamprecht@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=pbs-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox