<refnamediv>
<refname>sd_booted</refname>
- <refpurpose>Test whether the system is running the systemd init system.</refpurpose>
+ <refpurpose>Test whether the system is running the systemd init system</refpurpose>
</refnamediv>
<refsynopsisdiv>
implementation.</para>
<para>Internally, this function checks whether the
- <filename>/sys/fs/cgroup/systemd</filename> virtual file
- system is mounted, by comparing the st_dev value of
- the <function>stat()</function> data of
- <filename>/sys/fs/cgroup</filename> and
- <filename>/sys/fs/cgroup/systemd</filename>.</para>
+ directory <filename>/run/systemd/system/</filename>
+ exists. A simple check like this can also be
+ implemented trivially in shell or any other
+ language.</para>
<para>For details about the algorithm check the
liberally licensed reference implementation sources:
- <ulink url="http://cgit.freedesktop.org/systemd/systemd/plain/src/sd-daemon.c"/>
- resp. <ulink
+ <ulink url="http://cgit.freedesktop.org/systemd/systemd/plain/src/libsystemd-daemon/sd-daemon.c"/>
+ and <ulink
url="http://cgit.freedesktop.org/systemd/systemd/plain/src/systemd/sd-daemon.h"/></para>
<para><function>sd_booted()</function> is implemented
may copy the implementation into their source
tree. For more details about the reference
implementation see
- <citerefentry><refentrytitle>sd_daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
+ <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
<para>If the reference implementation is used as
drop-in files and -DDISABLE_SYSTEMD is set during
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
- <citerefentry><refentrytitle>sd_daemon</refentrytitle><manvolnum>7</manvolnum></citerefentry>
+ <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>
</para>
</refsect1>