From 0096c1ec08edbcee98574dcd7a53239a4be9dcd0 Mon Sep 17 00:00:00 2001 From: Nils <32552517+byReqz@users.noreply.github.com> Date: Sun, 24 Jan 2021 02:28:09 +0000 Subject: [PATCH] add fallback stops to loops --- stocheck.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stocheck.sh b/stocheck.sh index 08547d0..a9f6f43 100644 --- a/stocheck.sh +++ b/stocheck.sh @@ -18,6 +18,8 @@ while [ ! -n "$1" ]; do echo "------------------- /dev/sd$x --------------------" smartctl -H -i /dev/sd$x; echo "-------------------------------------------------" + else + exit fi done if [[ -z $(ls /dev | grep nvme) ]];then