Networking Forums

Networking Forums > Computer Networking > Linux Networking > dhcpcd works but starts two processes

Reply
Thread Tools Display Modes

dhcpcd works but starts two processes

 
 
Andy Richardson
Guest
Posts: n/a

 
      05-16-2005, 02:07 PM
My setup is working so I really shouldn't try to fix something that
isn't broken but it's bugging me.

On bootup, the /etc/rc.d/rc.inet1 is called only once.
Inside this script, I have put

ps axu | grep dhcpcd | grep -v grep
echo "Starting DHCP for eth0"
/sbin/dhcpcd eth0
echo "Starting DHCP for eth1"
/sbin/dhcpcd eth1
ps axu | grep dhcpcd | grep -v grep

this shows that there are no dhcpcd processes at the start and four
dhcpcd processes after.

the second ps shows

171 /sbin/dhcpcd eth0
174 /sbin/dhcpcd eth0
177 /sbin/dhcpcd eth1
182 /sbin/dhcpcd eth1

You can see that the script isn't being duplicated somewhere or the pid
order would show eth0, eth1, eth0, eth1.

/etc/dhcpc/dhcpcd-eth0.pid contains 174
/etc/dhcpc/dhcpcd-eth1.pid contains 182

It doesn't matter if I kill 171 or 174, eth0 will still lose its
address. (The same goes for eth1)

HOWEVER...

killall dhcpcd
/sbin/dhcpcd eth0
/sbin/dhcpcd eth1

gives both interfaces their addresses back but only results in one
process for each.

Hmmm
Any ideas?
 
Reply With Quote
 
 
 
 
Trygve Selmer
Guest
Posts: n/a

 
      05-17-2005, 12:38 AM
Andy Richardson wrote:
> My setup is working so I really shouldn't try to fix something that
> isn't broken but it's bugging me.
>
> On bootup, the /etc/rc.d/rc.inet1 is called only once.
> [snip]
> Hmmm
> Any ideas?


If you run Slackware, which version ? Normally, rc.inet1 will start
dhcpcd if you don't assign any static ip (in rc.inet1 or rc.inet1.conf
depending on Slackware version). Why did you insert the extra stuff in
rc.inet1 ?

 
Reply With Quote
 
Andy Richardson
Guest
Posts: n/a

 
      05-17-2005, 10:19 AM
Trygve Selmer wrote:
> If you run Slackware, which version ? Normally, rc.inet1 will start
> dhcpcd if you don't assign any static ip (in rc.inet1 or rc.inet1.conf
> depending on Slackware version). Why did you insert the extra stuff in
> rc.inet1 ?


The extra stuff was just to prove to myself by watching the screen
during boot up that there were no dhcpcd processes before these
statements and four processes afterwards.


--
Andy Richardson

We need Linux, like dolphins need a hole in the head.
 
Reply With Quote
 
Trygve Selmer
Guest
Posts: n/a

 
      05-17-2005, 10:38 AM
Andy Richardson wrote:
> Trygve Selmer wrote:
> > If you run Slackware, which version ? Normally, rc.inet1 will start

>
>> dhcpcd if you don't assign any static ip (in rc.inet1 or rc.inet1.conf
>> depending on Slackware version). Why did you insert the extra stuff in
>> rc.inet1 ?

>
> The extra stuff was just to prove to myself by watching the screen
> during boot up that there were no dhcpcd processes before these
> statements and four processes afterwards.


Yes, but what distribution are you running ? Hard to tell what's going
on without any real information.

 
Reply With Quote
 
Andy Richardson
Guest
Posts: n/a

 
      05-19-2005, 12:06 PM
> Yes, but what distribution are you running ? Hard to tell what's going
> on without any real information.


I'm running Vectorlinux4.0 which is apparently based on Slackware -
though it seems you had already spotted that.

Your interest in the startup scripts has given me some ideas. I have met
some similar 'quirks' when setting up a DHCP server on the same network.

So , I'm off to spend the afternoon getting acquainted with the startup
scripts. It seems that some files are left over from the distribution
maintainer's original slackware setup and their own box. (some stuff is
never called and some is called twice from different places.)

It may just be some odd case statements in the scripts falling through
and calling the daemon twice.

I know Vectorlinux4.0 is at least 4 years old but it runs on my 4x
Pentium 166 machines with 32-64M ram.
So obviously nothing mission critical here ;-)


--
Andy Richardson

We need Linux, like dolphins need a hole in the head.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dhcpcd - dns only Paulo da Silva Linux Networking 4 12-09-2010 08:42 PM
Killing Zombie Processes ralfthewise Linux Networking 1 09-17-2005 02:55 PM
dhcpcd can't get an IP George Bell Linux Networking 1 12-19-2003 01:08 PM
dhcpcd Matthew Paterson Linux Networking 5 10-29-2003 07:20 PM
Processes from within telnetd stay forever when connection is aborted in 2.4. Kernel (in 2.2. it works fine) Joerg Toellner Linux Networking 0 07-22-2003 07:27 AM



1 2 3 4 5 6 7 8 9 10 11