Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
0792c6de
Commit
0792c6de
authored
Jul 01, 2017
by
Mike Hibler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support using a FreeBSD 10.x smartctl binary in nodecheck.
FreeBSD 8.x smartctl binary does work with 10.x kernel.
parent
056143e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
clientside/tmcc/common/checknode/checkutils.sh
clientside/tmcc/common/checknode/checkutils.sh
+16
-0
No files found.
clientside/tmcc/common/checknode/checkutils.sh
View file @
0792c6de
...
...
@@ -32,6 +32,7 @@ fi
[[
-z
"
${
host
-
}
"
]]
&&
declare
host
#emulab hostname
[[
-z
"
${
failed
-
}
"
]]
&&
declare
failed
=
""
#major falure to be commicated to user
[[
-z
"
${
os
-
}
"
]]
&&
declare
os
=
""
#[Linux|FreeBSD] for now
[[
-z
"
${
osrel
-
}
"
]]
&&
declare
osrel
=
""
#release major number
[[
-z
"
${
todo_exit
-
}
"
]]
&&
declare
-a
todo_exit
=(
'echo "Exit trap"'
)
[[
-z
"
${
hwinv
[hwinvidx]-
}
"
]]
&&
declare
-A
hwinv[
"hwinvidx"
]=
""
# hwinv from tmcc
[[
-z
"
${
hwinvcopy
[hwinvidx]-
}
"
]]
&&
declare
-A
hwinvcopy[
"hwinvidx"
]=
""
# a copy of hwinv from tmcc
...
...
@@ -71,6 +72,13 @@ initialize () {
if
[
-z
"
${
BINDIR
-
""
}
"
]
;
then
if
[
-f
"/etc/emulab/paths.sh"
]
;
then
source
/etc/emulab/paths.sh
# XXX paths.sh resets PATH so we need to re-add any special bindir
ldir
=
`
$BINDIR
/tmcc hwinfo |
grep
LOGDIR
=
|
\
sed
-e
's/.*LOGDIR="\(.*\)".*/\1/'
`
bdir
=
$ldir
/
`
uname
-s
`
/bin-
`
uname
-m
`
if
[
-d
$bdir
]
;
then
export
PATH
=
"
$PATH
:
$bdir
"
fi
else
export
BINDIR
=
/usr/local/etc/emulab
export
LOGDIR
=
/var/tmp
...
...
@@ -600,6 +608,7 @@ inithostname() {
echo
"ERROR uname messed up"
exit
1
fi
osrel
=
`
uname
-r
|
sed
's/^\([0-9][0-9]*\)\..*/\1/'
`
if
[
-e
"
$BINDIR
/tmcc"
]
;
then
host
=
$(
$BINDIR
/tmcc nodeid
)
else
...
...
@@ -618,6 +627,13 @@ inithostname() {
findSmartctl
()
{
local
findit
=
$(
which smartctl
)
if
[
"
$os
"
==
"FreeBSD"
]
;
then
if
[
"
$osrel
"
==
"9"
]
;
then
findit
=
$(
which smartctl9
)
elif
[
"
$osrel
"
==
"10"
]
;
then
findit
=
$(
which smartctl10
)
fi
fi
if
[
-z
"
${
findit
}
"
]
;
then
if
[
-x
"/usr/sbin/smartctl"
]
;
then
findit
=
"/usr/sbin/smartctl"
...
...
Write
Preview
Markdown
is supported
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