systemctl: is-failed: check if system is degraded when no unit given

Closes #3335
This commit is contained in:
Mike Yuan
2023-10-17 20:47:54 +08:00
parent def1e20a18
commit 2ee346160c
4 changed files with 35 additions and 10 deletions

View File

@@ -135,6 +135,8 @@ systemctl restart "$UNIT_NAME"
systemctl stop "$UNIT_NAME"
(! systemctl is-active "$UNIT_NAME")
assert_eq "$(systemctl is-system-running)" "$(systemctl is-failed)"
# enable/disable/preset
test_enable_disable_preset() {
(! systemctl is-enabled "$@" "$UNIT_NAME")