LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 02-07-2004, 10:20 PM   #1
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Rep: Reputation: 32
dhcpcd being started twice on boot


Recently I upgraded to slackware-current using swaret. Now, whenever I boot up, there are two instances of dhcpcd trying to configure my eth0. If I want to be able to access the internet, I have to killall dhcpcd and re-run rc.inet1. I have looked in the /etc/rc.d directory and I can't find anything that would cause this. Is there something I'm overlooking?
 
Old 02-07-2004, 10:23 PM   #2
slackwarefan
Member
 
Registered: Oct 2003
Location: Florida
Distribution: Slackware
Posts: 273

Rep: Reputation: 30
did you look at /etc/rc.d/rc.S speicifly?
 
Old 02-07-2004, 10:33 PM   #3
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Original Poster
Rep: Reputation: 32
Yep, and rc.inet1. The only dhcpcd statements I can find in /etc/rc.d are in rc.0 and rc.6 which kill it, and rc.inet1 that starts it (once) for eth0.
 
Old 02-07-2004, 11:00 PM   #4
slackwarefan
Member
 
Registered: Oct 2003
Location: Florida
Distribution: Slackware
Posts: 273

Rep: Reputation: 30
Did you cat both of them and check them with grep?
 
Old 02-07-2004, 11:08 PM   #5
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Original Poster
Rep: Reputation: 32
Code:
[pete@l0s2 rc.d]$ grep dhcp *
rc.0:# Try to kill dhcpcd so the DHCP leases can be returned:
rc.0:killall -15 dhcpcd 1> /dev/null 2> /dev/null
rc.6:# Try to kill dhcpcd so the DHCP leases can be returned:
rc.6:killall -15 dhcpcd 1> /dev/null 2> /dev/null
rc.firewall:# This may help if you have a dynamic IP address \(e.g. slip, ppp, dhcp\).
rc.inet1:  /sbin/dhcpcd -t 10 ${DHCP_HOSTNAME} -d eth0
rc.inet1:  /sbin/dhcpcd -t 10 ${DHCP_HOSTNAME2} -d eth1
rc.S:  /var/run/ppp* /etc/dhcpc/dhcpcd-eth0.pid /etc/forcefsck /etc/fastboot
[pete@l0s2 rc.d]$
The rc.S line is the continuation of some line deleting temporary files at boot.
 
Old 11-12-2004, 03:56 PM   #6
maciek
LQ Newbie
 
Registered: Mar 2003
Distribution: slackware
Posts: 24

Rep: Reputation: 15
.

well i have the same problem, and no idea how to solve it, cat /var/log/messages gives this:
Code:
Nov 12 22:16:33 maciek kernel: ACPI: PCI interrupt 0000:00:06.0[A] -> GSI 10 (level, low) -> IRQ 10
Nov 12 22:16:33 maciek kernel: eth0: RealTek RTL8139 at 0xe0cdcf00, 00:02:44:67:56:7f, IRQ 10
Nov 12 22:16:33 maciek kernel: ACPI: PCI interrupt 0000:00:0b.0[A] -> GSI 5 (level, low) -> IRQ 5
Nov 12 22:16:33 maciek kernel: eth1: RealTek RTL8139 at 0xe0cf1e00, 00:40:f4:9d:0e:b2, IRQ 5
Nov 12 22:16:33 maciek logger: /etc/rc.d/rc.inet1:  /sbin/ifconfig eth0 192.168.0.1 broadcast 192.168.0.7 netmask 255.255.255.248
Nov 12 22:16:33 maciek logger: /etc/rc.d/rc.inet1:  /sbin/dhcpcd -d -t 10 eth1
Nov 12 22:16:33 maciek kernel: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
Nov 12 22:16:33 maciek kernel: agpgart: Detected VIA KT266/KY266x/KT333 chipset
Nov 12 22:16:33 maciek kernel: agpgart: Maximum main memory to use for agp memory: 439M
Nov 12 22:16:33 maciek kernel: agpgart: AGP aperture is 128M @ 0xe0000000
Nov 12 22:16:33 maciek kernel: eth1: link up, 100Mbps, full-duplex, lpa 0x45E1
Nov 12 22:16:33 maciek logger: /etc/rc.d/rc.inet1:  /sbin/ifconfig eth0 192.168.0.1 broadcast 192.168.0.7 netmask 255.255.255.248
Nov 12 22:16:33 maciek logger: /etc/rc.d/rc.inet1:  /sbin/dhcpcd -d -t 10 eth1
Nov 12 22:16:36 maciek logger: /etc/rc.d/rc.hotplug start (exiting script)
i've been checking rc.M, but there is only one call to rc.inet1, however from logs it seems that it is called twice
 
Old 11-13-2004, 08:47 AM   #7
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 768

Rep: Reputation: 64
On my system I get

/etc/rc.d/rc.inet1: eth0 is already up, skipping

in /var/log/messages, but I have never really thought about it as it didn't cause a problem.

I found that there is a file /etc/hotplug/net.agent
to be honest I dont know really what this file is about, but it contains the section

# Slackware Linux:
if [ -x /etc/rc.d/rc.inet1 ]; then
# Interface already up? If so, skip.
if ! /sbin/ifconfig | grep "^${INTERFACE} " 1> /dev/null ; then
debug_mesg run rc.inet1
exec /etc/rc.d/rc.inet1
fi

could this be where it is getting called from?

you could try making net.agent non executable and testing with a reboot
-I haven't researched this very thoroughly, but it wouldn't hurt to try-

tobyl
 
Old 11-13-2004, 12:47 PM   #8
maciek
LQ Newbie
 
Registered: Mar 2003
Distribution: slackware
Posts: 24

Rep: Reputation: 15
.

ok the simplest solution will be to move the section
Code:
if [ -x /etc/rc.d/rc.inet1 ]; then
  . /etc/rc.d/rc.inet1
fi
in rc.M just after the hotplug section
as hotplug loads all kernel modules, and then you may comment out section in net.agent, that tobyl mentioned
Code:
# Slackware Linux:
#if [ -x /etc/rc.d/rc.inet1 ]; then
# Interface already up? If so, skip.
#if ! /sbin/ifconfig | grep "^${INTERFACE} " 1> /dev/null ; then
#debug_mesg run rc.inet1
#exec /etc/rc.d/rc.inet1
#fi
as for now this is the only solution i came up with
 
  


Reply



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
running dhcpcd on boot gendreau Linux - Newbie 2 04-01-2012 03:08 PM
Boot Delay DHCPCD Kelman Linux - Wireless Networking 5 10-13-2005 04:23 PM
Boot problems... dhcpcd? danthehat Linux - Software 0 08-03-2005 02:10 PM
How do I start dhcpcd on boot? hello321_1999 Linux - Networking 7 11-26-2004 12:05 PM
dhcpcd at boot rgiggs Slackware 4 07-06-2004 11:49 AM

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

All times are GMT -5. The time now is 05:00 PM.

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
Open Source Consulting | Domain Registration