summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2012-12-27 17:39:48 +0100
committerLennart Poettering <lennart@poettering.net>2013-01-04 00:33:25 +0100
commit1a0fce458d3b45624c5817006735d59a5689ef83 (patch)
treeaf19cc44d5034336094be2bfa5e807a2e725fbc0 /man
parentc8be47e81568629f8ae9135ab2219de0180c04ac (diff)
systemctl: add is-failed
Adds is-failed to join is-active and is-enabled. I grabbed this one from the todo list. Most of the functionality was already there for is-active. I just needed to make check_one_unit take the states to check for as an argument instead of the hardcoded "active" and "reloading". is-failed will return 1 if none of the units given are failed. This is different from is-active which will return 3 if none of the units given are active. It returns 3 with this comment: /* According to LSB: "program is not running" */ As that does not make sense when looking for failed units I simply chose 1 instead.
Diffstat (limited to 'man')
-rw-r--r--man/systemctl.xml13
1 files changed, 13 insertions, 0 deletions
diff --git a/man/systemctl.xml b/man/systemctl.xml
index 62446d7a57..f86952c683 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -198,6 +198,7 @@
STDOUT in
<command>snapshot</command>,
<command>is-active</command>,
+ <command>is-failed</command>,
<command>enable</command> and
<command>disable</command>.</para></listitem>
</varlistentry>
@@ -601,6 +602,18 @@
state to STDOUT.</para></listitem>
</varlistentry>
<varlistentry>
+ <term><command>is-failed [NAME...]</command></term>
+
+ <listitem><para>Check whether any of
+ the specified units are failed.
+ Returns an exit code
+ 0 if at least one is failed, non-zero
+ otherwise. Unless
+ <option>--quiet</option> is specified
+ this will also print the current unit
+ state to STDOUT.</para></listitem>
+ </varlistentry>
+ <varlistentry>
<term><command>status [NAME...|PID...]</command></term>
<listitem><para>Show terse runtime