From e056966bc7cd8512007405d8b2b97ae3175ef3bf Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 11 Mar 2021 08:17:21 +0100 Subject: [PATCH] d/postinst: restart when updating from older version 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 --- 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