1SD_BOOTED(3)                       sd_booted                      SD_BOOTED(3)
2
3
4

NAME

6       sd_booted - Test whether the system is running the systemd init system
7

SYNOPSIS

9       #include <systemd/sd-daemon.h>
10
11       int sd_booted(void);
12

DESCRIPTION

14       sd_booted() checks whether the system was booted up using the systemd
15       init system.
16

RETURN VALUE

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

NOTES

23       These APIs are implemented as a shared library, which can be compiled
24       and linked to with the libsystemd pkg-config(1) file.
25
26       Internally, this function checks whether the directory
27       /run/systemd/system/ exists. A simple check like this can also be
28       implemented trivially in shell or any other language.
29

SEE ALSO

31       systemd(1), sd-daemon(3)
32
33
34
35systemd 245                                                       SD_BOOTED(3)
Impressum