From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id A626769607 for ; Thu, 11 Mar 2021 09:58:58 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A1776252AC for ; Thu, 11 Mar 2021 09:58:28 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 3762F252A4 for ; Thu, 11 Mar 2021 09:58:28 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id F0DBA458EB for ; Thu, 11 Mar 2021 09:58:27 +0100 (CET) From: Thomas Lamprecht To: pbs-devel@lists.proxmox.com Date: Thu, 11 Mar 2021 09:58:21 +0100 Message-Id: <20210311085821.10230-1-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.049 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] applied: [PATCH backup] d/postinst: restart when updating from older version X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Mar 2021 08:58:58 -0000 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 --- 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