Package: salt Version: 0.12.1-1 Tags: patch User: pkg-utopia-maintain...@lists.alioth.debian.org Usertags: logind
Hello, Upstream recently updated sd_booted() to check for /run/systemd/system instead of checking for the "systemd" cgroup. This fixes cases where you run systemd without logind, or run a system inside a container, etc: http://cgit.freedesktop.org/systemd/systemd/commit/?id=66e411811b8090 salt's Python implementation of this needs to be updated accordingly. (Please see [1] for further details if you are interested) I attach a patch against the current Debian version, but not in debdiff form as I suppose you want to apply this upstream? Please let me know if you want this in a different form. Thanks for considering, Martin [1] https://mail.gnome.org/archives/desktop-devel-list/2013-March/msg00092.html -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
--- salt/modules/systemd.py.orig 2013-03-21 10:35:39.941569682 +0100 +++ salt/modules/systemd.py 2013-03-21 10:36:56.293573377 +0100 @@ -30,15 +30,10 @@ try: # This check does the same as sd_booted() from libsystemd-daemon: # http://www.freedesktop.org/software/systemd/man/sd_booted.html - cgroup_fs = os.stat('/sys/fs/cgroup') - cgroup_systemd = os.stat('/sys/fs/cgroup/systemd') + if os.stat('/run/systemd/system'): + __context__['systemd.sd_booted'] = True except OSError: __context__['systemd.sd_booted'] = False - else: - if cgroup_fs.st_dev != cgroup_systemd.st_dev: - __context__['systemd.sd_booted'] = True - else: - __context__['systemd.sd_booted'] = False return __context__['systemd.sd_booted']
signature.asc
Description: Digital signature