From 94f099d8132da7987a5dbe930dadf31aaded9a11 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 23 Sep 2015 17:04:43 +0200 Subject: systemctl: make "systemctl is-system-running" return "offline" if we are not booted with systemd This sounds like the better place to expose this than in "systemd-notify --booted". Also document the so far undocumented "unknown" state the command might return. And rearrange the table of states documented to be more like the one for "is-running". Also, don't document the precise exit code of this function, just say errors are reported != 0 or > 0... --- man/systemctl.xml | 50 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 13 deletions(-) (limited to 'man/systemctl.xml') diff --git a/man/systemctl.xml b/man/systemctl.xml index c1359d1678..9e9ba5a5b6 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -1120,9 +1120,9 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service - Printed string - Meaning - Return value + Name + Description + Exit Code @@ -1137,7 +1137,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service linked Made available through a symlink to the unit file (permanently or just in /run). - 1 + > 0 linked-runtime @@ -1145,7 +1145,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service masked Disabled entirely (permanently or just in /run). - 1 + > 0 masked-runtime @@ -1163,7 +1163,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service disabled Unit file is not enabled. - 1 + > 0 @@ -1474,22 +1474,25 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service Checks whether the system is operational. This - returns success when the system is fully up and running, - meaning not in startup, shutdown or maintenance - mode. Failure is returned otherwise. In addition, the + returns success (exit code 0) when the system is fully up + and running, specifically not in startup, shutdown or + maintenance mode, and with no failed services. Failure is + returned otherwise (exit code non-zero). In addition, the current state is printed in a short string to standard output, see table below. Use to suppress this output. - Manager Operational States - - - + <command>is-system-running</command> output + + + + Name Description + Exit Code @@ -1499,32 +1502,53 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service basic.target is reached or the maintenance state entered. + > 0 starting Late bootup, before the job queue becomes idle for the first time, or one of the rescue targets are reached. + > 0 running The system is fully operational. + 0 degraded The system is operational but one or more units failed. + > 0 maintenance The rescue or emergency target is active. + > 0 stopping The manager is shutting down. + > 0 + + + offline + The manager is not + running. Specifically, this is the operational + state if an incompatible program is running as + system manager (PID 1). + > 0 + + + unknown + The operational state could not be + determined, due to lack of resources or another + error cause. + > 0 -- cgit v1.2.3-54-g00ecf