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
4ac3512b
Commit
4ac3512b
authored
Jun 17, 2013
by
Dan Reading
Browse files
read and honor the new TESTINFO line from tmcc hwinfo
parent
aa96a7dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
clientside/tmcc/common/checknode/rc.nodecheck
View file @
4ac3512b
...
...
@@ -33,44 +33,64 @@ if [ -r /etc/emulab/paths.sh ]; then
else
BINDIR
=
/etc/testbed
fi
PROJDIR
=
/proj/emulab-ops
host
=
`
$BINDIR
/tmcc nodeid
`
MFSPROJDIR
=
/proj/emulab-ops
testinfo
=
`
$BINDIR
/tmcc hwinfo |
grep
TESTINFO
`
if
[
-n
"
$testinfo
"
]
;
then
x
=
`
echo
$testinfo
|
awk
-F
=
'{print $3}'
|
awk
'{print $1}'
`
if
[
-n
"
$x
"
]
;
then
collect
=
$x
else
collect
=
1
fi
x
=
`
echo
$testinfo
|
awk
-F
=
'{print $4}'
`
if
[
-n
"
$x
"
]
;
then
check
=
$x
else
check
=
1
fi
fi
# XXX MFSes don't have all the apps we need, so mount an extra directory
if
[
-f
"/etc/emulab/ismfs"
]
;
then
if
[
$#
-eq
2
-a
"
$1
"
=
"boot"
-a
"
$2
"
=
"gather"
]
;
then
:
if
[
"
$collect
"
=
"0"
]
;
then
echo
'testbed says not run nodecheck gather, skipping'
exit
0
fi
else
echo
'nodecheck only supports gather mode in MFS at boot time, skipping'
exit
0
fi
if
[
!
-d
"
$PROJDIR
"
]
;
then
mkdir
-p
$PROJDIR
# MFSes don't have all the apps we need, so mount an extra directory
# and put in the path
if
[
!
-d
"
$MFSPROJDIR
"
]
;
then
mkdir
-p
$MFSPROJDIR
fi
mounted
=
0
if
[
!
-d
"
$PROJDIR
/nodecheck"
]
;
then
mount
-o
soft,intr,bg fs:
$PROJDIR
$PROJDIR
if
[
!
-d
"
$
MFS
PROJDIR
/nodecheck"
]
;
then
mount
-o
soft,intr,bg fs:
$
MFS
PROJDIR
$
MFS
PROJDIR
if
[
$?
-ne
0
]
;
then
echo
'*** Could not mount $PROJDIR, nodecheck not done'
echo
'*** Could not mount $
MFS
PROJDIR, nodecheck
gather
not done'
exit
0
fi
mounted
=
1
fi
os
=
`
uname
-s
`
if
[
!
-f
$PROJDIR
/nodecheck/
$os
/bin/bash
]
;
then
echo
"*** Did not find expected bash in
$PROJDIR
/
$os
/bin"
if
[
!
-f
$
MFS
PROJDIR
/nodecheck/
$os
/bin/bash
]
;
then
echo
"*** Did not find expected bash in
$
MFS
PROJDIR
/
$os
/bin"
fi
export
PATH
=
"/usr/local/bin:
$PROJDIR
/nodecheck/
$os
/bin:
$PATH
"
export
PATH
=
"/usr/local/bin:
$
MFS
PROJDIR
/nodecheck/
$os
/bin:
$PATH
"
echo
'Running Hardware Inventory Gather'
bash
$BINDIR
/gatherinv
echo
'Done Running Hardware Inventory'
if
[
$mounted
-ne
0
]
;
then
umount
$PROJDIR
umount
$
MFS
PROJDIR
fi
exit
0
fi
...
...
@@ -81,10 +101,16 @@ fi
#
hwinfo
=
`
$BINDIR
/tmcc hwinfo
`
if
[
-z
"
$hwinfo
"
]
;
then
echo
"Skipping nodechecks"
echo
"Skipping nodechecks
tmcc does not support hwinfo
"
exit
0
fi
if
[
"
$check
"
=
"0"
]
;
then
echo
'testbed says not run nodecheck, skipping'
exit
0
fi
if
[
$#
-eq
2
-a
"
$1
"
=
"boot"
-a
"
$2
"
=
"gather"
]
;
then
echo
'nodecheck only supports gather mode in MFS at boot time, skipping'
exit
0
...
...
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