[systemd-devel] [PATCH] systemctl: add is-failed

Thomas H.P. Andersen phomes at gmail.com
Thu Dec 27 10:28:20 PST 2012


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-systemctl-add-is-failed.patch
Type: application/octet-stream
Size: 9167 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20121227/0eab6836/attachment-0001.obj>


More information about the systemd-devel mailing list