LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-09-2006, 01:26 PM   #1
ardya
LQ Newbie
 
Registered: Mar 2006
Posts: 9

Rep: Reputation: 8
network init script bug?


I have what may be a possible bug in Slackware network init scripts, the result being multiple dhcp clients for a single interface. I came across this while trying to debug a named issue at boot, and have not resolved either problem. I have 4 machines running Slackware, 3 on 10.2, 1 on 10.1.
2 of the 10.2, and the 10.1 machines show multiple dhcpcd clients running for a single interface. 2 of those boxes have two nics, with eth0 being dhcp, and eth1 being statically assigned. All machines were recently upgraded to 2.6.16 from 2.4.x, and all are kept up to date patch-wise. I don't recall if the multiple dhcp client for one interface issue showed up under 2.4.x, so I don't know if this is a kernel issue, or an rc.inet1 script bug...

Anyone else experience the multiple dhcp client for a single interface issue, or know of a fix?

This machine has two nics, eth1 is static IP:
root@dev:~#cat /etc/slackware-version && ps ax|grep dhcp|grep -v grep
Slackware 10.2.0
1241 ? S<s 0:00 /sbin/dhcpcd -t 30 -R -d eth0
1245 ? Ss 0:00 /sbin/dhcpcd -t 30 -R -d eth0

This machine has one nic:
root@ws:~# cat /etc/slackware-version && ps ax|grep dhcp|grep -v grep
Slackware 10.2.0
1460 ? S<s 3:02 /sbin/dhcpcd -d -t 60 eth0
1464 ? Ss 1:22 /sbin/dhcpcd -d -t 60 eth0

This machine has one nic:
root@daw1:/boot# cat /etc/slackware-version && ps ax|grep dhcp|grep -v grep
Slackware 10.2.0
1344 ? S<s 0:00 /sbin/dhcpcd -d -t 10 eth0
(The only odd one of the 4 that seems to work correctly, diffing rc.inet1 with the other 10.2 boxes revealed nothing untoward)

This machine has two nics, eth1 is static IP:
root@rdb:/etc# cat /etc/slackware-version && ps ax|grep dhcp|grep -v grep
Slackware 10.1.0
1223 ? S<s 0:00 /sbin/dhcpcd -R -d -t 10 eth0
1232 ? Ss 0:00 /sbin/dhcpcd -R -d -t 10 eth0

This last machine I've added lines to rc.inet1 at the bottom of the script to start a dhcp server on eth1, and network init seems to start the dhcp server twice, which made me think there's a problem in the logic or for loop used by rc.inet1, but as I've mentioned above, this all seems to have started when moving from 2.4.x kernel to 2.6.x

Thanks
 
Old 05-09-2006, 04:25 PM   #2
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 52
you could look at the logger message in /var/log/messages
to see if they are started at the same time.
( you'll need the log from the time the pc booted)

if so, the script might start it twice.
( don't know if that's possible).

egag
 
Old 05-09-2006, 05:05 PM   #3
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
I am running Slackware current with kernel 2.6.12, and I only see one DHCP process for my NIC. I don't have any machines running straight 10.2 to test on, though.

Though this topic does remind me of an apparent DHCP bug I saw in Slackware current on my laptop. At shutdown, I would sometimes get a few errors saying something like "Cannot execute /etc/dhcpc/dhcpcd.exe: permission denied".
 
Old 05-10-2006, 06:45 PM   #4
ardya
LQ Newbie
 
Registered: Mar 2006
Posts: 9

Original Poster
Rep: Reputation: 8
Thanks for responding, but none of this helps, perhaps I'll look elsewhere....
 
Old 05-10-2006, 06:59 PM   #5
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 66
Quote:
Originally Posted by MS3FGX
Though this topic does remind me of an apparent DHCP bug I saw in Slackware current on my laptop. At shutdown, I would sometimes get a few errors saying something like "Cannot execute /etc/dhcpc/dhcpcd.exe: permission denied".
I get thesame thing, on occasion. Not always, but about 80% of the time.
Looking into the rc.inet1 ans rc.inet1.conf files to resolve a different issue, also. Get a "eth_up" error too.
 
Old 05-11-2006, 01:43 AM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,736

Rep: Reputation: 6304Reputation: 6304Reputation: 6304Reputation: 6304Reputation: 6304Reputation: 6304Reputation: 6304Reputation: 6304Reputation: 6304Reputation: 6304Reputation: 6304
Quote:
Though this topic does remind me of an apparent DHCP bug I saw in Slackware current on my laptop. At shutdown, I would sometimes get a few errors saying something like "Cannot execute /etc/dhcpc/dhcpcd.exe: permission denied".

I get thesame thing, on occasion. Not always, but about 80% of the time.
I have a working set of files that you can dump into the /etc/dhcpc/ directory at http://www.slackware.com/~alien/dhcpc/

Quote:
Looking into the rc.inet1 ans rc.inet1.conf files to resolve a different issue, also. Get a "eth_up" error too.
That sounds like a messed-up upgrade from Slackware-10.1 ... or an installed 3rd party package that overwrote rc.inet1 perhaps? The "eth_up" function call was present in rc.inet1 until slackware 10.2 where it got replaced with "if_up".

Eric
 
Old 05-11-2006, 01:59 AM   #7
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 66
No, Eric, straight from your rc.inet1 ,rc.inet1.conf, rc.wireless, and rc.wireless.conf files....

I'm gonna look into it, see what happened, but this is a 'clean' install from 'current', never had 10.1 even waving nearby....
 
Old 05-11-2006, 02:03 AM   #8
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 66
Just looked at rc.inet1, and lo and behold, something put "eth1 up" in there....
A mystery.....Cleaned it out. Now hunky dory for that....Now for dhcpcd weirdness at init 6....
 
Old 05-11-2006, 02:08 AM   #9
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,736

Rep: Reputation: 6304Reputation: 6304Reputation: 6304Reputation: 6304Reputation: 6304Reputation: 6304Reputation: 6304Reputation: 6304Reputation: 6304Reputation: 6304Reputation: 6304
If only I could remember where I saw it mentioned before... there is a 3rd party package that edits rc.inet1 when you install it, and writes eth_up in there. Can you check
Code:
ls -lrt /var/log/packages
to see what you installed after slackware-current? Must be a network related package. A wireless network manager perhaps?

Eric
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write init script shahrokhnikou Programming 4 10-24-2005 04:08 PM
Adding to init script djgblz Linux - Newbie 4 07-28-2005 11:12 AM
help with bug in script joesbox Programming 7 09-26-2003 07:02 PM
lirc init script... El_Angelo Slackware 4 09-25-2003 02:20 AM
could use some help with my init.d script.... BrianK Linux - General 3 10-31-2002 08:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration