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:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user