summaryrefslogtreecommitdiff
path: root/testing/systemd/systemd.install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-05-04 00:01:57 +0000
committerroot <root@rshg054.dnsready.net>2012-05-04 00:01:57 +0000
commit0a24fb835cac4007388213ad0afb15257b035b14 (patch)
tree799a160f6daeb40ccbb6f1d06e7ef3ea0caaf660 /testing/systemd/systemd.install
parent5520a8b04cecf4af812cbf2285e9ab6efabe147f (diff)
Fri May 4 00:01:56 UTC 2012
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
}