some fine tuning just in case hdd temp returns say 34.5

This commit is contained in:
inxi-svn 2011-06-06 21:04:15 +00:00
parent b8686ef409
commit 722c3f77d6

2
inxi
View file

@ -3711,7 +3711,7 @@ get_hdd_temp_data()
fi
# this will fail if regular user and no sudo present, but that's fine, it will just return null
hdd_temp=$( eval $sudo_command $HDDTEMP_PATH -nq -u C $1 )
if [[ -n $hdd_temp && -n $( grep -E '^([0-9]+)$' <<< $hdd_temp ) ]];then
if [[ -n $hdd_temp && -n $( grep -E '^([0-9\.]+)$' <<< $hdd_temp ) ]];then
echo $hdd_temp
fi
fi