Commit 32c7ae00 authored by Dan Reading's avatar Dan Reading
Browse files

handle set -u on when sourcing. Better warning message if no tmcc

parent 21dcb353
......@@ -548,16 +548,14 @@ inithostname() {
if [ -e "$BINDIR/tmcc" ] ; then
host=$($BINDIR/tmcc nodeid)
else
echo "ERROR no tmcc command"
echo "WARN no $BINDIR/tmcc command for nodeid"
# maybe its just time to give up
if [ -z "$host" ] ; then
if [ -e "$BOOTDIR/realname" ] ; then
host=$(cat $BOOTDIR/realname)
elif [ -e "$BOOTDIR/nodeid" ] ; then
host=$(cat $BOOTDIR/nodeid)
else
host=$(hostname)
fi
if [ -e "${BOOTDIR}/realname" ] ; then
host=$(cat $BOOTDIR/realname)
elif [ -e "$BOOTDIR/nodeid" ] ; then
host=$(cat $BOOTDIR/nodeid)
else
host=$(hostname)
fi
fi
return 0
......
Markdown is supported
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