Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcpd fails to start in scripts but will start manually..
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
quantus
n00b
n00b


Joined: 30 Jul 2002
Posts: 60

PostPosted: Mon Apr 07, 2003 8:52 pm    Post subject: dhcpd fails to start in scripts but will start manually.. Reply with quote

ok, i have two interfaces ( no nating or routing ), eth0 acquires an address from an upstream dhcpcd server sucessfully. eth1 has a fixed address.

the dhcpd server works when manually started via '/etc/runlevels/default/dhcp start'. Nodes off of eth1 sucessfulyl receive their addresses so dhcpd.conf is good. ( dhcpd only serves nodes on eth1 )

However, on system boot up my dhcp server never starts ( have to manually kick it off )... logs show nada... any ideas?

'net.eth0', 'net.eth1', and 'dhcp' are in '/etc/runlevels/default'
Back to top
View user's profile Send private message
Jimbow
Guru
Guru


Joined: 18 Feb 2003
Posts: 597
Location: Silver City, NM

PostPosted: Tue Apr 08, 2003 1:12 pm    Post subject: Reply with quote

What does your /etc/conf.d/net look like?

That is the file that tells the system that ethX is dhcpd (or fixed). You need:
Code:
iface_eth0="dhcp"
#dhcpcd_eth0="..."


uncomment out the 2nd line it send parameters to dhcpcd.
_________________
After Perl everything else is just assembly language.
Back to top
View user's profile Send private message
quantus
n00b
n00b


Joined: 30 Jul 2002
Posts: 60

PostPosted: Wed Apr 09, 2003 10:03 pm    Post subject: Reply with quote

eth0 runs a dhcpcd client to fetch an adress. eth1 runs a dhcpd server for hte nodes down stream of eth1.

/etc/conf.d/net
Code:
iface_eth0="dhcp"
dhcpcd_eth0="-N"
iface_eth1="10.1.1.253 broadcast 10.1.1.255 netmask 255.255.255.0"

and /etc/conf.d/dhcp
Code:
IFACE="eth1"
DHCPD_OPTS=""


the group of computers behind eth1 need dhcpd on the gentoo boxen... unfortuantely dhcpd never starts despite being in /etc/runlevels/default

Dose "need net" make sure both interfaces ( net.eth0 net.eth1 )are set up before proceeding?
Back to top
View user's profile Send private message
Jimbow
Guru
Guru


Joined: 18 Feb 2003
Posts: 597
Location: Silver City, NM

PostPosted: Wed Apr 09, 2003 10:40 pm    Post subject: Reply with quote

quantus wrote:
Dose "need net" make sure both interfaces ( net.eth0 net.eth1 )are set up before proceeding?


No. It only makes sure that at least one of them is running. It is set up as a client with multiple ways to connect (like hardware and wireless) it is not set up out of the box as a gateway.

I think it would be fairly easy to change things around a little so that the services start up in the exact order you want.

You probably only need to change one of the net.ethX scripts. You could rename the one you want to start first to prenet.ethX, copy conf.d/net to conf.d/prenet and then add "need prenet "to net.ethY
Code:
depend() {
   use pcmcia
   need prenet
}


The alternative is to rename the one you want to start second. You will know which one to rename by knowing what the other startup scripts (that "need net") should wait for. If they only need the first ethX then rename the 2nd one. If they need both ethX and ethY then rename the first one.
_________________
After Perl everything else is just assembly language.
Back to top
View user's profile Send private message
quantus
n00b
n00b


Joined: 30 Jul 2002
Posts: 60

PostPosted: Thu Apr 10, 2003 4:12 am    Post subject: still does not work Reply with quote

rc-update can not find the new dependancy...
Code:
rc-update del net.eth1
mv /etc/init.d/net.eth1 /etc/init.d/net2.eth1
rc-udpate add net2.eth1 default
rc-update del dhcp
changed /etc/init.d/dhcp
Code:
depend() {
    need net net2
}
then ran the following
Code:
rc-update add dhcp default
 * dhcp added to runlevel default...
 * Caching service dependencies...
 * NEED:  can't find service net2 needed by dhcp;
 *        continuing...                                                                       [ ok ]
 * rc-update complete.
so the name of the script before the period does not automatically privide a service by that name... what does?
Back to top
View user's profile Send private message
quantus
n00b
n00b


Joined: 30 Jul 2002
Posts: 60

PostPosted: Thu Apr 10, 2003 4:39 am    Post subject: Solved, system boots with service started now Reply with quote

changed /etc/init.d/net.eth1 to
Code:
depend() {
        use pcmcia
        provide dhcpdfix
}
and /etc/init.d/dhcp to
Code:
depend() {
    need net dhcpdfix
}
general enlightenment sourced from http://www.gentoo.org/doc/en/rc-scripts.xml
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum