diff options
author | Michael Biebl <biebl@debian.org> | 2012-02-11 10:36:57 +0100 |
---|---|---|
committer | Tollef Fog Heen <tfheen@err.no> | 2012-02-27 22:48:23 +0100 |
commit | 655aeebaa548778afb4581bb3a246723c2c89cef (patch) | |
tree | 276a0fe107af6df067ff57c79da9f756b54352f1 | |
parent | 824df6f4e78bdf453672d6544d806d13a9b33a11 (diff) | |
download | systemd-655aeebaa548778afb4581bb3a246723c2c89cef.tar.gz |
Avoid error messages from systemctl in postinst
if systemd is not running by checking for /sys/fs/cgroup/systemd before
executing systemctl. Closes: #642749
Conflicts:
debian/changelog
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | debian/systemd.postinst | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index 0ea028844e..2e077aca31 100644 --- a/debian/changelog +++ b/debian/changelog @@ -25,6 +25,9 @@ systemd (43-1) unstable; urgency=low * Install /var/log/journal directory where the journal files are stored persistently. * Setup systemd-journald to not read from /proc/kmsg (ImportKernel=no). + * Avoid error messages from systemctl in postinst if systemd is not running + by checking for /sys/fs/cgroup/systemd before executing systemctl. + Closes: #642749 -- Tollef Fog Heen <tfheen@debian.org> Tue, 07 Feb 2012 21:36:34 +0100 diff --git a/debian/systemd.postinst b/debian/systemd.postinst index 7f7c2daaca..56f508a79e 100644 --- a/debian/systemd.postinst +++ b/debian/systemd.postinst @@ -2,8 +2,14 @@ set -e +_systemctl() { + if [ -e /sys/fs/cgroup/systemd ]; then + systemctl "$@" + fi +} + if [ -n "$2" ]; then - systemctl daemon-reexec || true + _systemctl daemon-reexec || true fi # Do a one-time migration of the local time setting |