From 485885ba9485f743ed0b33bce61acc996231c1d1 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 17 Nov 2021 21:23:37 +0100 Subject: do not print errors, if no raids in the pc --- shutdownasap.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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' {} + \ , \ -- cgit v1.2.3-70-g09d2