Commit ead6325e authored by David Johnson's avatar David Johnson

Make sure to set the hostname to the fqdn in the widearea case.

parent dc10d326
......@@ -156,11 +156,17 @@ cnet_start()
fi
# set hostname
hostname "$WA_HOSTNAME"
hosts_str="$WA_HOSTNAME"
echo "$WA_HOSTNAME" | grep -q \\.
if [ $? = 0 ]; then
hostname "$WA_HOSTNAME"
else
hostname "${WA_HOSTNAME}.${WA_DOMAIN}"
hosts_str="${WA_HOSTNAME}.${WA_DOMAIN} ${hosts_str}"
fi
# setup hosts file
echo "$WA_IP_ADDR ${WA_HOSTNAME}.${WA_DOMAIN} $WA_HOSTNAME" >> \
/etc/hosts
echo "$WA_IP_ADDR ${hosts_str}" >> /etc/hosts
# setup a few necessary emulab files...
echo "$cnetif" > $ELAB_BOOTDIR/controlif
......
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