Sorry for the late reply. On 8/4/07, David Olsson <[EMAIL PROTECTED]> wrote: > 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.
Interesting. I did the updating of the dhcpcd package a while back to 3.0.17. Are you using a version 2 package or version 3? In all honesty, I don't really use dhcpcd. I did a short functional test, but not any detailed analysis, and you're analysis seems sane. You're supposed to create the ifconfig.<dev>/dhcpcd file to indicate to the network scripts that you want to enable the dhcpcd service for that device (actually, the file can be called whatever you want, the important part is the SERVICE variable in the file). I'll try to get dhcpcd installed again and check it out, but if you're pretty confident about the situation, send a patch. I'm guessing just /etc/sysconfig/network-devices/dhcpcd needs to change. Does another argument need to be added by default to ifconfig.<dev>/dhcpcd to not get an infinite lease time? Is that the desired behavior? -- Dan -- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
