From 00bbb7f118480e9fa76062438b2af879e90cc569 Mon Sep 17 00:00:00 2001 From: Sami Olmari Date: Sat, 8 Jun 2019 16:41:57 +0300 Subject: [PATCH] Make systemctl show all failed units Essentially this change will show the header for systmectl and then all failed units regardless of "type", until there comes newline. Signed-off-by: Sami Olmari --- terminal/status.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminal/status.sh b/terminal/status.sh index 3b37b67..b2584fa 100755 --- a/terminal/status.sh +++ b/terminal/status.sh @@ -649,7 +649,7 @@ printSystemctl() systcl_num_failed=$(systemctl --failed | grep "loaded units listed" | head -c 1) if [ "$systcl_num_failed" -ne "0" ]; then - local failed=$(systemctl --failed | grep ".service") + local failed=$(systemctl --failed | systemctl --failed|awk '/UNIT/,/^$/') printf "${fc_crit}SYSTEMCTL FAILED SERVICES:\n" printf "${fc_info}${failed}${fc_none}\n\n"