summaryrefslogtreecommitdiff
path: root/testing/systemd/systemd.install
diff options
context:
space:
mode:
Diffstat (limited to 'testing/systemd/systemd.install')
-rw-r--r--testing/systemd/systemd.install20
1 files changed, 8 insertions, 12 deletions
diff --git a/testing/systemd/systemd.install b/testing/systemd/systemd.install
index 822108c0f..0c3e9abee 100644
--- a/testing/systemd/systemd.install
+++ b/testing/systemd/systemd.install
@@ -29,18 +29,14 @@ post_upgrade() {
fi
if sd_booted; then
- systemctl daemon-reload
- systemctl daemon-reexec
- fi
-
- newpkgver=${1%-*}
- oldpkgver=${2%-*}
-
- # catch v31 need for restarting systemd-logind.service
- if [ "$newpkgver" -ge 31 ] && [ "$oldpkgver" -lt 31 ]; then
- # but only if systemd is running
- if sd_booted; then
- systemctl try-restart systemd-logind.service
+ # we moved the binary in 44-2 to /usr, so a reexec leads to a
+ # coredump. refuse this reexec and warn the user that they should
+ # reboot instead.
+ if [ "$(vercmp 44-2 "$2")" -eq 1 ]; then
+ echo "warning: refusing to reexec systemd. the system should be rebooted."
+ else
+ systemctl daemon-reload
+ systemctl daemon-reexec
fi
fi
}