Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

dhcpcd works but starts two processes

Reply
 
Thread Tools Display Modes
  #1  
Old 05-16-2005, 03:07 PM
Default dhcpcd works but starts two processes



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?


Andy Richardson
Reply With Quote
  #2  
Old 05-17-2005, 01:38 AM
Trygve Selmer
Guest
 
Posts: n/a
Default Re: dhcpcd works but starts two processes

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
  #3  
Old 05-17-2005, 11:19 AM
Andy Richardson
Guest
 
Posts: n/a
Default Re: dhcpcd works but starts two processes

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
  #4  
Old 05-17-2005, 11:38 AM
Trygve Selmer
Guest
 
Posts: n/a
Default Re: dhcpcd works but starts two processes

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
  #5  
Old 05-19-2005, 01:06 PM
Andy Richardson
Guest
 
Posts: n/a
Default Re: dhcpcd works but starts two processes

> 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

Tags
dhcpcd, processes, starts, works

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
Forum Jump


All times are GMT. The time now is 07:04 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.