[18578] in Athena Bugs

home help back first fref pref prev next nref lref last post

Re: linux 8.4.17: hostname set to (none) sometimes on boot with DHCP

daemon@ATHENA.MIT.EDU (Michael P Phillips)
Mon Dec 4 05:03:25 2000

Message-Id: <200012041003.FAA31521@holygrail.mit.edu>
To: Jonathon Weiss <jweiss@MIT.EDU>, Camilla Fox <cfox@MIT.EDU>
Cc: bugs@MIT.EDU
In-Reply-To: Your message of "Mon, 27 Nov 2000 19:18:26 EST."
             <200011280018.TAA02915@detraction.mit.edu> 
Date: Mon, 04 Dec 2000 05:03:18 -0500
From: Michael P Phillips <mpp@MIT.EDU>


I have additional information regarding this problem, and two potential ways
to fix it. DHCP does not appear to be the issue. 

The actual problem appears to be that there is a race condition. The race is
between the PCMCIA cardmgr loading the module for eth0 and the boot
sequence executing "/etc/rc.d/init.d/network start". If the module is loaded
when this script runs, then the eth0 device is found and configured 
properly.

If not, then cardmgr runs "/etc/pcmcia/network start" after it loads the
module. This configured the card for use on the network, but mysteriously
fails to set the hostname properly.

The difference appears to be that in the boot sequence, 
/etc/rc.d/init.d/network configures eth0 with 
   "/etc/sysconfig/network-scripts/ifup eth0 boot"
while pcmcia's network script runs
   "/etc/sysconfig/network-scripts/ifup eth0"

Why does that matter? 'ifup' invokes /etc/sysconfig/network-scripts/ifup-post
with the same arguments it ran with. 'ifup-post' will detect the 
"(none)" hostname on interfaces which are not loopback, slip, or ppp and 
look up the correct name. HOWEVER, "boot" must be passed to the script
in order for it to perform this test. 

Two possible fixes:
   - Modify /etc/pcmcia/network to pass "boot" to ifup
   - Modify /etc/sysconfig/network-scripts/ifup-post to not require "boot"
     be passed in.

It seems that this should effect generic RedHat laptop systems, and has 
nothing to do with DHCP or Athena.

If you want them, I typed in the output of the boot sequence on a "good boot"
and on a boot where PCMCIA took too long to initialize (perhaps only on a
cold boot?)

I should note that earlier to combat this problem I renumbered the pcmcia
symlink in /etc/rc.d/rc5.d/ to make it start earlier; the normal configuration
had it starting much later and I got the "(none)" result. This is
consistent with what I've oberved above.

Mike


home help back first fref pref prev next nref lref last post