Hotspare Count should not go below zero

This commit is contained in:
SourceDoctor
2020-01-18 19:37:09 +01:00
parent 16e35492c2
commit 4e97a51a65
+3
View File
@@ -80,6 +80,9 @@ if [ -d /dev/md ] ; then
RAID_MISSING_DEVICES=$RAID_MISSING_DEVICES']'
let "RAID_HOTSPARE_COUNT=ALL_DEVICE_COUNT-RAID_DISC_COUNT"
if [ $RAID_HOTSPARE_COUNT -lt 0 ]; then
RAID_HOTSPARE_COUNT=0
fi
ARRAY_DATA='{'\
'"name":"'$RAID_NAME\