1SD_BOOTED(3) sd_booted SD_BOOTED(3)
2
3
4
6 sd_booted - Test whether the system is running the systemd init system
7
9 #include <systemd/sd-daemon.h>
10
11 int sd_booted(void);
12
14 sd_booted() checks whether the system was booted up using the systemd
15 init system.
16
18 On failure, this call returns a negative errno-style error code. If the
19 system was booted up with systemd as init system, this call returns a
20 positive return value, zero otherwise.
21
23 Functions described here are available as a shared library, which can
24 be compiled against and linked to with the libsystemd pkg-config(1)
25 file.
26
27 Internally, this function checks whether the directory
28 /run/systemd/system/ exists. A simple check like this can also be
29 implemented trivially in shell or any other language.
30
32 systemd(1), sd-daemon(3)
33
34
35
36systemd 254 SD_BOOTED(3)