1
0
mirror of https://github.com/Spearfoot/FreeNAS-scripts synced 2025-12-06 01:23:19 +00:00

Consistent if and do code formatting

This commit is contained in:
Keith Nash
2017-03-19 10:52:24 -05:00
committed by GitHub
parent 840e276dc2
commit 8cc12e4a30

View File

@@ -30,13 +30,12 @@ get_smart_drives()
gs_smartdrives=""
for gs_drive in $gs_drives
do
gs_smart_flag=$(/usr/local/sbin/smartctl -i /dev/"$gs_drive" | grep "SMART support is: Enabled" | awk '{print $4}')
if [ "$gs_smart_flag" == "Enabled" ]; then
gs_smartdrives=$gs_smartdrives" "${gs_drive}
fi
done
for gs_drive in $gs_drives; do
gs_smart_flag=$(/usr/local/sbin/smartctl -i /dev/"$gs_drive" | grep "SMART support is: Enabled" | awk '{print $4}')
if [ "$gs_smart_flag" == "Enabled" ]; then
gs_smartdrives=$gs_smartdrives" "${gs_drive}
fi
done
eval "$1=\$gs_smartdrives"
}