summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-11-17 21:23:37 +0100
committerErich Eckner <git@eckner.net>2021-11-17 21:23:37 +0100
commit485885ba9485f743ed0b33bce61acc996231c1d1 (patch)
treea2af01c1ad26732018f456d414056aee2d4d1565
parent3e20d3e2fdda1569197453e33c3dcd342150fe16 (diff)
downloadshutdownasap-485885ba9485f743ed0b33bce61acc996231c1d1.tar.xz
do not print errors, if no raids in the pc
-rwxr-xr-xshutdownasap.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/shutdownasap.in b/shutdownasap.in
index 384425d..8cf3210 100755
--- a/shutdownasap.in
+++ b/shutdownasap.in
@@ -100,7 +100,8 @@ do
fi
errors=$(
- find /sys/devices/virtual/block/ \
+ [ -d /sys/devices/virtual/block/ ] \
+ && find /sys/devices/virtual/block/ \
-name 'array_state' \
-exec grep -HvxF 'clean' {} + \
, \