Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 14516 - bootmisc deletes dhcpcd pidfile on startup, makes terminating dhcpcd hard
Summary: bootmisc deletes dhcpcd pidfile on startup, makes terminating dhcpcd hard
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-24 19:54 UTC by DC
Modified: 2003-08-07 10:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DC 2003-01-24 19:54:19 UTC
In baselayout 1.8.5.8, dhcpcd 1.3.22_p3-r3, the /etc/init.d/bootmisc script
removes dhcpcd's pidfile in /var/run/dhcpcd-eth0.pid. This happens AFTER dhcpcd
has already been started. As a result, when dhcpcd is killed with dhcpcd -k (as
/etc/init.d/net.eth0 does), dhcpcd complains "****  dhcpcd: not running."

The problem is that when bootmisc checks to see if it is deleting the pidfile of
running processes, it "ps" and "grep"s for a process with the same name as the
base part of the pidfile's name. Since there is no process named dhcpcd-eth0, it
blithely wipes out dhcpcd-eth0.pid.

BTW, why does bootmisc run AFTER net.eth0? (I verified this by making both
scripts append a string into a log file when they ran.) Since bootmisc is in the
boot runlevel, and dhcpcd is in the default runlevel, shouldn't dhcpcd run
afterwards?
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-26 01:30:10 UTC
What runlevel is net.eth0 ?  Do you have hotplug, and in what runlevel?  Could
you include a log of the whole boot process ?
Comment 2 DC 2003-01-26 03:02:22 UTC
I have hotplug, but it's not used (it's not in any runlevel). Net.eth0 is in the
default runlevel. And how should I get a log of the whole boot process? The
logger doesn't start until a lot of the action has taken place.
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-26 04:01:49 UTC
Just copy and past as much as you can.  I basically want to see when net.eth0
is started.  Normally bootmisc should run before it, meaning it should not remove
the pidfile ...
Comment 4 DC 2003-01-26 16:42:09 UTC
It goes by a bit fast to copy and paste, so I changed ebegin() in function.sh to
pipe to a file. Here was the output, starting right after the drive got
remounted read-write (there was still some stuff that got written to the
console, but hopefully everything important is here):

 * Setting hostname to localhost.localnet...
 * Calculating module dependencies...
 *   Loading module eepro100...
 *   Loading module ide-scsi...
 *   Loading module sg...
 *   Loading module sr_mod...
 *   Loading module NVdriver...
 *   Loading module apm...
 *   Loading module hid...
 *   Loading module mousedev...
 *   Loading module lp...
 * Bringing eth0 up...
 *   Loading module i8k...
 *   Loading module ieee1394...
 * Checking all filesystems...
 * Mounting local filesystems...
 * Mounting USB device filesystem...
 * Activating (possibly) more swap...
 * Setting system clock to hardware clock [Local Time]...
 * Configuring kernel parameters...
 * Updating environment...
 * Cleaning /var/lock, /var/run...
 * Cleaning /tmp directory...
 * Initialising ALSA....
 * Setting user font...
 * Loading key mappings...
 * Bringing lo up...
 * Initializing random number generator...
 * Starting metalog...
 * Starting cupsd...
 * Starting gpm...
 * Loading iptables state and starting firewall...
 * Mounting network filesystems...
 * Starting ntpd...
 * Starting postfix...
 * Starting sshd...
 * Starting vcron...
 * Starting local...
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2003-01-26 20:45:47 UTC
Any idea why net.eth0 gets started before bootmisc ?
Comment 6 DC 2003-01-26 22:29:27 UTC
No idea at all. Neither depends on the other.
Comment 7 Martin Schlemmer (RETIRED) gentoo-dev 2003-08-07 10:38:55 UTC
Sorry for being MIA for so long.  This should be fixed in the 1.8.6.* versions,
as they check for running daemons in bootmisc before deleting a pid file.
Please open again, or add new if still an issue with latest baselayout.