Commit 16ed1edb authored by Dan Reading's avatar Dan Reading
Browse files

the string "na" was filtering out disk serial numbers that had

"na" in them. Change the string to NotApp(case senstive).
parent 53ed66d8
......@@ -515,11 +515,11 @@ printtmcinfo() {
obj=${objval%%=*}
val=${objval##*=}
[[ -z $val ]] && continue # bad also no value (or empty string)
u=${val,,} #lower case
[[ $u == ${u/unk} ]] || continue # the value has the UNKNOWN value
[[ $u == ${u/na} ]] || continue # the value has the NA
[[ $u == ${u/not} ]] || continue # the value has the LinuxNot
[[ $u == ${u/bad} ]] || continue # the value bad_dd
u=$val # orignal value
[[ $u == ${u/UNKNOWN} ]] || continue # the value has the UNKNOWN value
[[ $u == ${u/NoInfo} ]] || continue # the value has the NA
[[ $u == ${u/LINUXNOT} ]] || continue # the value has the LinuxNot
[[ $u == ${u/bad_} ]] || continue # has on of the bad_* strings
# out put the stuff the database wants
# skip the stuff the database does not want
case $obj in
......
......@@ -393,13 +393,13 @@ getdriver() {
# echo "UNKNOWN"
# return 0
# fi
echo "NA"
echo "NoInfo"
return 0
}
gettype() {
smtcl=$(findSmartctl)
if [ "${smtcl/smartctl}" == "$smtcl" ] ; then
echo "NA"
echo "NoInfo"
return 0
fi
res=$($smtcl -i $1 | grep "ATA Version is")
......@@ -426,7 +426,7 @@ gettype() {
gettemp() {
smtcl=$(findSmartctl)
if [ "${smtcl/smartctl}" == "$smtcl" ] ; then
echo "NA"
echo "NoInfo"
return 0
fi
res="$($smtcl -l scttempsts $1 | grep -i "Current Temperature:" | awk '{print $3}')"
......@@ -451,7 +451,7 @@ getmodel() {
else
# XXX # note: 'camcontrol devlist'
# will give model on FreeBSD
echo "NA"
echo "NoInfo"
return 0
fi
else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment