mirror of
https://github.com/Spearfoot/FreeNAS-scripts
synced 2025-12-11 13:53:19 +00:00
Consistent if and do code formatting
This commit is contained in:
@@ -30,13 +30,12 @@ get_smart_drives()
|
|||||||
|
|
||||||
gs_smartdrives=""
|
gs_smartdrives=""
|
||||||
|
|
||||||
for gs_drive in $gs_drives
|
for gs_drive in $gs_drives; do
|
||||||
do
|
gs_smart_flag=$(/usr/local/sbin/smartctl -i /dev/"$gs_drive" | grep "SMART support is: Enabled" | awk '{print $4}')
|
||||||
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
|
||||||
if [ "$gs_smart_flag" == "Enabled" ]; then
|
gs_smartdrives=$gs_smartdrives" "${gs_drive}
|
||||||
gs_smartdrives=$gs_smartdrives" "${gs_drive}
|
fi
|
||||||
fi
|
done
|
||||||
done
|
|
||||||
|
|
||||||
eval "$1=\$gs_smartdrives"
|
eval "$1=\$gs_smartdrives"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user