You are not logged in.
Morning!
There is a slight problem with the dhcpcd daemon tool. When started, it creates a pid file in it's configuration dir, which lies in /etc/dhcpc by default. As long as this file exists, dhcpcd will not start (again). Unfortunately, after a bad crash, powerloss, or otherwise induced hard shutdown, this file is not deleted, and the /etc/rc.d/network script fails to start dhcpcd on bootup because of the persistent existance of this file. A cheap workaround is to simply add an rm -f <configdir>/*.pid before the dhcpcd call in the network script, but that's a bit too much of a workaround for my taste, as I'd prefer the pid file to be created where it belongs, below /var/run, and automatically cleaned on bootup to prevent such problems.
-- EDIT
I just remember that this is only tested on a machine using relatively old packages, from the beginning of the 0.4 release, so I'm not sure whether this is fixed already somehow. At least the pid file is still in /etc/dhcpc/, though.
-- EDIT
Does anyone see a more.. elegant way to accomplish the remedication of this problem?
Greets,
Dennis
"That's the problem with good advice. Nobody wants to hear it."
-- Dogbert
Offline
this is interesting..
maybe we should save all the pid files from bootup daemonds to one single dir, then at boot up erase them.
it is a nice suggestion.
anyway that's the workaround is not elegant but it works..
GNU/Linux: Share & Enjoy!
Offline
Yea, this problem should be fixed in the current version of initscripts.
if [ "$new_ifline" = "dhcp" ]; then
# remove the .pid file if it exists
rm -f /etc/dhcpc/dhcpcd-${ifline}.pid >/dev/null 2>&1
/usr/sbin/dhcpcd -D -H -h $HOSTNAME $ifline || stat_die
Offline