This got lost, I think.  So here it is again.

On my BLFS 6.2 system, the SysVinit script

    /etc/rc.d/init.d/network stop

does not kill dhcpcd.  Tracing it to the script

    /etc/sysconfig/network-devices/services/dhcpcd

it turns out that if the dhcp lease time is infinite, the script believes that 
dhcpcd exited after startup.  Such is not the case, and I don't see in the 
dhcpcd docs that it should be true.  Is anyone familiar with these scripts?  
The question is, shall we eliminate the check for infinite lease time, and kill 
the running dhcpcd.

Why hasn't anyone noticed this, you ask?  Because shutdown sends dhcpcd a 
terminate signal and dhcpcd is well-behaved, that being what it expects.  
However, if you

    telinit 1

then

    telinit 3

you get a nasty error message that interrupts the SysVinit sequence and tells 
you you'd better track down the problem and report it.  So I did.

Additional Point:  If the scripts DO kill dhcpcd, they do it with

    dhcpcd -k

which does NOT seem to be the recommended way to stop dhcpcd.  With '-k' dhcpcd 
destroys the ip info cache, so that next time it will request a new ip address, 
rather than first trying to reestablish the old one.  dhcpcd EXPECTS to receive 
a terminate (SIGTERM) signal, in which case the cache is preserved.  It looks 
to me like if we do not set DHCP_STOP in

    /etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd  (in my case)

then killproc() will do the job for us, sending SIGTERM instead of invoking the 
-k option.

Okay.  Whew.  Let me know if I should submit a patch or something.  Actually I 
don't know yet who creates the ifconfig.<dev>/dhcpcd file, but I can probably 
figure it out.

David Olsson
Easthampton, MA
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to