]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/sd_booted.xml
man: xinclude pkg-config note
[thirdparty/systemd.git] / man / sd_booted.xml
CommitLineData
f9378423
LP
1<?xml version='1.0'?> <!--*-nxml-*-->
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5<!--
6 This file is part of systemd.
7
8 Copyright 2010 Lennart Poettering
9
10 systemd is free software; you can redistribute it and/or modify it
5430f7f2
LP
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
f9378423
LP
13 (at your option) any later version.
14
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5430f7f2 18 Lesser General Public License for more details.
f9378423 19
5430f7f2 20 You should have received a copy of the GNU Lesser General Public License
f9378423
LP
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22-->
23
6a70f3aa
ZJS
24<refentry id="sd_booted"
25 xmlns:xi="http://www.w3.org/2001/XInclude">
f9378423
LP
26
27 <refentryinfo>
28 <title>sd_booted</title>
29 <productname>systemd</productname>
30
31 <authorgroup>
32 <author>
33 <contrib>Developer</contrib>
34 <firstname>Lennart</firstname>
35 <surname>Poettering</surname>
36 <email>lennart@poettering.net</email>
37 </author>
38 </authorgroup>
39 </refentryinfo>
40
41 <refmeta>
42 <refentrytitle>sd_booted</refentrytitle>
43 <manvolnum>3</manvolnum>
44 </refmeta>
45
46 <refnamediv>
47 <refname>sd_booted</refname>
34511ca7 48 <refpurpose>Test whether the system is running the systemd init system</refpurpose>
f9378423
LP
49 </refnamediv>
50
51 <refsynopsisdiv>
52 <funcsynopsis>
a822cbfa 53 <funcsynopsisinfo>#include &lt;systemd/sd-daemon.h&gt;</funcsynopsisinfo>
f9378423
LP
54
55 <funcprototype>
56 <funcdef>int <function>sd_booted</function></funcdef>
57 <paramdef>void</paramdef>
58 </funcprototype>
59 </funcsynopsis>
60 </refsynopsisdiv>
61
62 <refsect1>
63 <title>Description</title>
64 <para><function>sd_booted()</function> checks whether
65 the system was booted up using the systemd init system.</para>
66 </refsect1>
67
68 <refsect1>
69 <title>Return Value</title>
70
71 <para>On failure, this call returns a negative
72 errno-style error code. If the system was booted up
af62c704 73 with systemd as init system, this call returns a
436c44a5 74 positive return value, zero otherwise.</para>
f9378423
LP
75 </refsect1>
76
77 <refsect1>
78 <title>Notes</title>
79
6a70f3aa 80 <xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
f9378423
LP
81
82 <para>Internally, this function checks whether the
66e41181
LP
83 directory <filename>/run/systemd/system/</filename>
84 exists. A simple check like this can also be
85 implemented trivially in shell or any other
86 language.</para>
f9378423
LP
87 </refsect1>
88
89 <refsect1>
90 <title>See Also</title>
91 <para>
160cd5c9 92 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
cb07866b 93 <citerefentry><refentrytitle>sd-daemon</refentrytitle><manvolnum>3</manvolnum></citerefentry>
f9378423
LP
94 </para>
95 </refsect1>
96
97</refentry>