]> code.delx.au - monosys/commitdiff
smart-stats: smartctl returns non-zero if there are errors in the smart log
authorJames Bunton <jamesbunton@delx.net.au>
Tue, 26 Feb 2019 12:03:25 +0000 (23:03 +1100)
committerJames Bunton <jamesbunton@delx.net.au>
Tue, 26 Feb 2019 12:03:25 +0000 (23:03 +1100)
smart-stats

index 4e1e58c0931b20a820de5f05bdb03a93c435307f..d3777b1d7aed5c83f4452785014c569a17198c50 100755 (executable)
@@ -1,7 +1,5 @@
 #!/bin/bash
 
-set -eu
-
 for dev in /dev/sd?; do
     if ! udevadm info "$dev" | grep -q ID_BUS=ata; then
         continue
@@ -11,3 +9,5 @@ for dev in /dev/sd?; do
     mkdir -p "$(dirname "$logfile")"
     smartctl -a "$dev" > "$logfile"
 done
+
+exit 0