On Thu, 24.09.15 15:51, Tomasz Torcz (to...@pipebreaker.pl) wrote: > 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.
Why would anyone care? It's not that anyone was actually using this... Also, by doing this, that software explicitls *wants* to be treated like systemd, hence why not let it? If people focus on weird init systems like that, that's certainly their own fault... Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel