5065N/A<?
xml version='1.0'?>
<!--*-nxml-*--> 5065N/A<!
DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 5065N/A This file is part of systemd. 6982N/A Copyright 2010 Lennart Poettering 5065N/A systemd is free software; you can redistribute it and/or modify it 5065N/A under the terms of the GNU Lesser General Public License as published by 5065N/A the Free Software Foundation; either version 2.1 of the License, or 5065N/A (at your option) any later version. 6982N/A systemd is distributed in the hope that it will be useful, but 6982N/A WITHOUT ANY WARRANTY; without even the implied warranty of 6982N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 5065N/A Lesser General Public License for more details. 5065N/A You should have received a copy of the GNU Lesser General Public License 5065N/A <
productname>systemd</
productname>
5065N/A <
contrib>Developer</
contrib>
5065N/A <
firstname>Lennart</
firstname>
5065N/A <
surname>Poettering</
surname>
5065N/A <
email>lennart@poettering.net</
email>
5065N/A <
refentrytitle>sd_booted</
refentrytitle>
5065N/A <
refname>sd_booted</
refname>
5065N/A <
refpurpose>Test whether the system is running the systemd init system</
refpurpose>
5065N/A <
funcdef>int <
function>sd_booted</
function></
funcdef>
5065N/A <
para><
function>sd_booted()</
function> checks whether the system
5065N/A was booted up using the systemd init system.</
para>
5065N/A <
title>Return Value</
title>
5065N/A <
para>On failure, this call returns a negative errno-style error
5065N/A code. If the system was booted up with systemd as init system,
5065N/A this call returns a positive return value, zero otherwise.</
para>
5065N/A <
para>Internally, this function checks whether the directory
5065N/A like this can also be implemented trivially in shell or any other
<
citerefentry><
refentrytitle>systemd</
refentrytitle><
manvolnum>1</
manvolnum></
citerefentry>,
<
citerefentry><
refentrytitle>sd-daemon</
refentrytitle><
manvolnum>3</
manvolnum></
citerefentry>