Commit 768a08e2 authored by Dan Reading's avatar Dan Reading
Browse files

FreeBSD MFS does not have file command, find bitness differently. Expand...

FreeBSD MFS does not have file command, find bitness differently. Expand helper bin directories to hold 32bit and 64bit directories.
parent ee77cd2f
......@@ -82,20 +82,12 @@ initialize () {
mfsmode=0
fi
save_e
set +e
# find native bit size
whichfile=$(which file)
[[ "${whichfile}" ]] || exit 1 # hard stop
bitsize=$(file -L $whichfile)
restore_e
if [ "$bitsize" != "${bitsize/32}" ] ; then
native_bitsize=32
elif [ "$bitsize" != "${bitsize/64}" ] ; then
native_bitsize=64
else
native_bitsize=0
fi
bitsize=$(uname -m)
case $bitsize in
i386 | x86 ) native_bitsize=32 ;;
amd64 | x86_64 ) native_bitsize=64 ;;
* ) native_bitsize=0 ;;
esac
inithostname
initlogs $@
......
......@@ -69,6 +69,7 @@ fi
# if asked to collect need the collect dir for this project
# (as given by tmcc hwinfo) mounted to save logs
set -x
if [ "$collect" = "1" ] ; then
collectdir=`echo $testinfo | awk -F \" '{print $2}'`
a=`echo $collectdir | awk -F \/ '{print $2}'`
......@@ -104,11 +105,11 @@ if [ -f "/etc/emulab/ismfs" ] ; then
fi
os=`uname -s`
if [ ! -f $MFSPROJDIR/nodecheck/$os/bin/bash ] ; then
echo "*** Did not find expected bash in $MFSPROJDIR/$os/bin"
fi
export PATH="/usr/local/bin:$MFSPROJDIR/nodecheck/$os/bin:$PATH"
export PATH="/usr/local/bin:$MFSPROJDIR/nodecheck/`uname -s`/bin-`uname -m`:/usr/local/bin:$MFSPROJDIR/nodecheck/bin:$PATH"
# if [ `echo $foundbash | grep nodecheck` ] ; then
# echo "*** Did not find expected bash in $MFSPROJDIR/$os/bin"
# fi
echo 'Running Hardware Inventory Gather'
bash $BINDIR/checknode $LOGDIR/nodecheck.log
......@@ -119,6 +120,7 @@ if [ -f "/etc/emulab/ismfs" ] ; then
fi
exit 0
fi
set +x
echo "Running nodechecks"
# truncate file at boot time
......
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