Systemd/src/libsystemd-daemon
Lennart Poettering 66e411811b sd-booted: update sd_booted() check a bit
Previously we were testing whether /sys/fs/cgroup/systemd/ was a mount
point. This might be problematic however, when the cgroup trees are bind
mounted into a container from the host (which should be absolutely
valid), which might create the impression that the container was running
systemd, but only the host actually is.

Replace this by a check for the existance of the directory
/run/systemd/system/, which should work unconditionally, since /run can
never be a bind mount but *must* be a tmpfs on systemd systems, which is
flushed at boots. This means that data in /run always reflects
information about the current boot, and only of the local container,
which makes it the perfect choice for a check like this.

(As side effect this is nice to Ubuntu people who now use logind with
the systemd cgroup hierarchy, where the old sd_booted() check misdetects
systemd, even though they still run legacy Upstart.)
2013-03-15 16:49:08 +01:00
..
.gitignore update .gitignore 2012-04-13 21:58:01 +02:00
libsystemd-daemon.pc.in move libsystemd-id128, libsystemd-daemon to subdir 2012-04-12 15:26:39 +02:00
libsystemd-daemon.sym move libsystemd-id128, libsystemd-daemon to subdir 2012-04-12 15:26:39 +02:00
Makefile build-sys: add stub makefiles to all subdirs to ease development with emacs 2012-04-13 21:37:59 +02:00
sd-daemon.c sd-booted: update sd_booted() check a bit 2013-03-15 16:49:08 +01:00