On Thu, Sep 24, 2015 at 03:01:21PM +0200, Lennart Poettering wrote: > That stackexchange link lists a pile of garbage. We have an official > API to check whether the system is booted with systemd: > sd_booted(). It's documented here: > > http://www.freedesktop.org/software/systemd/man/sd_booted.html > > And we even document on that man page what precisely it does > internally (which is equivalent to access("/run/systemd/system/", > F_OK) >= 0) and suggest people to reimplement that simple check in the > language of their choice, even in shell... That way, they don't even > have to link against libsystemd.
And then there is this sabotage: „This check is already broken, because uselessd creates this directory too” uselessd% git grep 'mkdir.*/run/systemd/system' src/core/main-no-init.c: mkdir_label("/run/systemd/system", 0755); src/core/mount-setup.c: mkdir_label("/run/systemd/system", 0755); src/core/unit.c: mkdir_p("/run/systemd/system", 0755); Meh. -- Tomasz Torcz "Funeral in the morning, IDE hacking xmpp: zdzich...@chrome.pl in the afternoon and evening." - Alan Cox _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel