From 4bdd4613bb3b83f0e4541e2bb0b093f9cf95c49f Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Fri, 24 Jul 2015 11:06:33 +0200 Subject: [PATCH] profile: Fix systemd error reporting --- .profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.profile b/.profile index 735827a2..562f7078 100644 --- a/.profile +++ b/.profile @@ -129,7 +129,7 @@ log_dmesg="$(dmesg | grep -i error)" [ -n "$log_dmesg" ] && echo "$log_dmesg" > "$HOME/errors-dmesg.log" || rm -f "$HOME/errors-dmesg.log" ## systemd if command -v systemctl >/dev/null 2>&1; then - count="$(systemctl -l --failed | awk '{print $1;exit}')" + count="$(systemctl show | awk -F= '$1=="NFailedUnits" {print $2; exit}')" if [ $count -ne 0 ]; then systemctl -l --failed > "$HOME/errors-systemd.log" else