summaryrefslogtreecommitdiff
path: root/community-testing/systemd/systemd.install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-08-02 04:35:55 +0000
committerroot <root@rshg054.dnsready.net>2011-08-02 04:35:55 +0000
commitbf35116f9d203dcafce808a6c7b3dd5a0db8afbc (patch)
treef9551a1d3c67d2113cc5fc5c3f8816bcbaad0540 /community-testing/systemd/systemd.install
parent1173ff2dba7d0fd3c45f170a5e353a76b7a5da2f (diff)
Tue Aug 2 04:35:55 UTC 2011
Diffstat (limited to 'community-testing/systemd/systemd.install')
-rw-r--r--community-testing/systemd/systemd.install23
1 files changed, 17 insertions, 6 deletions
diff --git a/community-testing/systemd/systemd.install b/community-testing/systemd/systemd.install
index b4228255d..a6c4dde12 100644
--- a/community-testing/systemd/systemd.install
+++ b/community-testing/systemd/systemd.install
@@ -1,13 +1,13 @@
#!/bin/sh
checkgroups() {
- getent group lock >/dev/null || groupadd -g 54 lock
+ usr/bin/getent group lock >/dev/null || usr/sbin/groupadd -g 54 lock
}
post_install() {
checkgroups
- [ -f etc/machine-id ] || systemd-machine-id-setup
+ [ -f etc/machine-id ] || bin/systemd-machine-id-setup
echo "systemd has been installed to /bin/systemd. Please ensure you append"
echo "init=/bin/systemd to your kernel command line in your bootloader."
@@ -16,16 +16,27 @@ post_install() {
post_upgrade() {
checkgroups
- [ -f etc/machine-id ] || systemd-machine-id-setup
- systemctl daemon-reexec >/dev/null || :
+ [ -f etc/machine-id ] || bin/systemd-machine-id-setup
+ bin/systemctl daemon-reexec >/dev/null || :
+
+ 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 [ -d sys/fs/cgroup/systemd ]; then
+ bin/systemctl try-restart systemd-logind.service
+ fi
+ fi
}
pre_remove() {
- rm -f /etc/systemd/system/default.target
+ bin/rm -f etc/systemd/system/default.target
}
post_remove() {
- getent group lock >/dev/null && groupdel lock
+ usr/bin/getent group lock >/dev/null && usr/sbin/groupdel lock
}
# vim:set ts=2 sw=2 et: