Commit 633a7a12 authored by Mike Hibler's avatar Mike Hibler
Browse files

Hack fix for an apparent boot-time race condition. Our pump-invoked

sethostname script properly sets the hostname, but sometimes that hostname
gets overridden by one of the static boot scripts which sets the hostname
back to "localhost".  The sequence is something like:
	pump runs on eth0 and fires off our sethostname script
	sethostname blocks
	ifup of eth1 starts, determines that hostname hasn't been
	  set (i.e., is set to "localhost") and remembers (NEEDHOSTNAME)
	sethostname finishes by setting the host name
	ifup of eth1 finishes, seeing NEEDHOSTNAME is set but doesn't
	  have anything to set it to so resets to "localhost"
Weird.  Hack is to make sure it never thinks it needs to set the hostname
by setting it to something that is not "localhost".  We do this once we
identify the control net interface (and thus know we will be running pump RSN).
parent 573cbe76
......@@ -4,6 +4,8 @@ DEVICE="eth0"
if [ "`control_interface`" = "$DEVICE" ]; then
BOOTPROTO="dhcp"
NEEDHOSTNAME=""
hostname emulab-localhost
fi
ONBOOT="yes"
IPADDR=""
......
......@@ -4,6 +4,8 @@ DEVICE="eth1"
if [ "`control_interface`" = "$DEVICE" ]; then
BOOTPROTO="dhcp"
NEEDHOSTNAME=""
hostname emulab-localhost
fi
ONBOOT="yes"
IPADDR=""
......
......@@ -4,6 +4,8 @@ DEVICE="eth2"
if [ "`control_interface`" = "$DEVICE" ]; then
BOOTPROTO="dhcp"
NEEDHOSTNAME=""
hostname emulab-localhost
fi
ONBOOT="yes"
IPADDR=""
......
......@@ -4,6 +4,8 @@ DEVICE="eth3"
if [ "`control_interface`" = "$DEVICE" ]; then
BOOTPROTO="dhcp"
NEEDHOSTNAME=""
hostname emulab-localhost
fi
ONBOOT="yes"
IPADDR=""
......
......@@ -4,6 +4,8 @@ DEVICE="eth4"
if [ "`control_interface`" = "$DEVICE" ]; then
BOOTPROTO="dhcp"
NEEDHOSTNAME=""
hostname emulab-localhost
fi
ONBOOT="yes"
IPADDR=""
......
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