Commit 6f498033 authored by David Johnson's avatar David Johnson
Browse files

Be more tolerant of statically-config'd widearea nodes whose switch ports

don't light up right away.
parent 99ef4056
......@@ -171,8 +171,22 @@ cnet_start()
# setup a few necessary emulab files...
echo "$cnetif" > $ELAB_BOOTDIR/controlif
if [ -e "/etc/emulab/bossnode" ]; then
bossnode=`cat /etc/emulab/bossnode`
echo `host "$bossnode"` > $ELAB_BOOTDIR/bossip
bossnode=`cat /etc/emulab/bossnode`
bossip=`host -t A "$bossnode"`
retval="$?"
i=0
while [ "$retval" != "0" -a $i -lt 180 ]; do
echo "Failed to resolve boss ($bossnode)!"
sleep 5
i=`expr $i + 1`
bossip=`host -t A "$bossnode"`
retval="$?"
done
if [ "$retval" = "0" ]; then
echo "Resolved boss ($bossnode) to $bossip."
echo `echo "$bossip" | sed -n -e 's/.*has address\s*\(.*\)/\1/p'` \
> $ELAB_BOOTDIR/bossip
fi
fi
echo "$WA_HOSTNAME" > $ELAB_BOOTDIR/realname
echo "$WA_IP_GATEWAY" > $ELAB_BOOTDIR/routerip
......
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