... | ... |
@@ -21,7 +21,7 @@ function sys_state () { |
21 | 21 |
echo "$SystemState mode ($NFailedUnits units failed):" |
22 | 22 |
echo "$(systemctl --failed --no-legend | awk ' |
23 | 23 |
{ |
24 |
- split($1, units, ".") |
|
24 |
+ split(gensub(/^[^[:alnum:]]*([^ ]+).*$/, "\\1", "1"), units, ".") |
|
25 | 25 |
failed[units[2]][units[1]]=1 |
26 | 26 |
numfailed[units[2]]++ |
27 | 27 |
} |