Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
16ed1edb
Commit
16ed1edb
authored
Oct 22, 2013
by
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
clientside/tmcc/common/checknode/checkutils.sh
View file @
16ed1edb
...
...
@@ -515,11 +515,11 @@ printtmcinfo() {
obj
=
${
objval
%%=*
}
val
=
${
objval
##*=
}
[[
-z
$val
]]
&&
continue
# bad also no value (or empty string)
u
=
$
{
val
,,
}
#lower cas
e
[[
$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 valu
e
[[
$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
...
...
clientside/tmcc/common/checknode/diskcheck
View file @
16ed1edb
...
...
@@ -393,13 +393,13 @@ getdriver() {
# echo "UNKNOWN"
# return 0
# fi
echo
"N
A
"
echo
"N
oInfo
"
return
0
}
gettype
()
{
smtcl
=
$(
findSmartctl
)
if
[
"
${
smtcl
/smartctl
}
"
==
"
$smtcl
"
]
;
then
echo
"N
A
"
echo
"N
oInfo
"
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
"N
A
"
echo
"N
oInfo
"
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
"N
A
"
echo
"N
oInfo
"
return
0
fi
else
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment