]> git.proxmox.com Git - systemd.git/blame - man/sd_booted.3
Imported Upstream version 221
[systemd.git] / man / sd_booted.3
CommitLineData
14228c0d 1'\" t
86f210e9 2.TH "SD_BOOTED" "3" "" "systemd 221" "sd_booted"
14228c0d
MB
3.\" -----------------------------------------------------------------
4.\" * Define some portability stuff
5.\" -----------------------------------------------------------------
6.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7.\" http://bugs.debian.org/507673
8.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10.ie \n(.g .ds Aq \(aq
11.el .ds Aq '
12.\" -----------------------------------------------------------------
13.\" * set default formatting
14.\" -----------------------------------------------------------------
15.\" disable hyphenation
16.nh
17.\" disable justification (adjust text to left margin only)
18.ad l
19.\" -----------------------------------------------------------------
20.\" * MAIN CONTENT STARTS HERE *
21.\" -----------------------------------------------------------------
22.SH "NAME"
23sd_booted \- Test whether the system is running the systemd init system
24.SH "SYNOPSIS"
25.sp
26.ft B
27.nf
28#include <systemd/sd\-daemon\&.h>
29.fi
30.ft
31.HP \w'int\ sd_booted('u
32.BI "int sd_booted(void);"
33.SH "DESCRIPTION"
34.PP
35\fBsd_booted()\fR
36checks whether the system was booted up using the systemd init system\&.
37.SH "RETURN VALUE"
38.PP
39On failure, this call returns a negative errno\-style error code\&. If the system was booted up with systemd as init system, this call returns a positive return value, zero otherwise\&.
40.SH "NOTES"
41.PP
60f067b4
JS
42These APIs are implemented as a shared library, which can be compiled and linked to with the
43\fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
44file\&.
14228c0d
MB
45.PP
46Internally, this function checks whether the directory
47/run/systemd/system/
48exists\&. A simple check like this can also be implemented trivially in shell or any other language\&.
14228c0d
MB
49.SH "SEE ALSO"
50.PP
51\fBsystemd\fR(1),
52\fBsd-daemon\fR(3)