Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
starting dhcpd at boot time after specific eth device
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
snIP3r
l33t
l33t


Joined: 21 May 2004
Posts: 853
Location: germany

PostPosted: Thu Aug 30, 2007 9:27 am    Post subject: starting dhcpd at boot time after specific eth device Reply with quote

hi all!

i have a gentoo box running as a homeserver using 2 ethernet devices: eth0 is bound to ppp0 and eth1 is used for the internal net. a dhcp server is bound to eth1. buit at boot time i am alway getting an error that the dhcp server cannot be startet because eth1 is not up. this is because eth1 was started after dhcp. the dhcp server ist started after the loopback device is started.

is there a way to start the dhcpd after eth1 is up and running??

i found the "depend()" section in the init script of dhcpd
Code:

depend() {
        need net
        use logger dns
}


am i able to use "after net.eth1" to start the daemon like i wanted it to start?

hope someone could help me with this.

thx in advance & greets

snIP3r
_________________
Intel i3-4130T on ASUS P9D-X
Kernel 5.15.88-gentoo SMP
-----------------------------------------------
if your problem is fixed please add something like [solved] to the topic!
Back to top
View user's profile Send private message
Seek
n00b
n00b


Joined: 22 Jul 2007
Posts: 47
Location: Austria

PostPosted: Thu Aug 30, 2007 3:41 pm    Post subject: Reply with quote

I think can use this:

Code:
depend() {
   need net.eth1
   use logger dns
}


This makes your dhcpd start only when eth1 is up and running.
Back to top
View user's profile Send private message
Stever
Apprentice
Apprentice


Joined: 01 Mar 2005
Posts: 151
Location: North Carolina

PostPosted: Thu Aug 30, 2007 4:00 pm    Post subject: Reply with quote

Or maybe take a look at /etc/conf.d/rc
Code:
# RC_NET_STRICT_CHECKING allows some flexibility with the 'net' service.
# The following values are allowed:
#  none  - The 'net' service is always considered up.
#  no    - This basically means that at least one net.* service besides net.lo
#          must be up.  This can be used by notebook users that have a wifi and
#          a static nic, and only wants one up at any given time to have the
#          'net' service seen as up.
#  lo    - This is the same as the 'no' option, but net.lo is also counted.
#          This should be useful to people that do not care about any specific
#          interface being up at boot.
#  yes   - For this ALL network interfaces MUST be up for the 'net' service to
#          be considered up.

RC_NET_STRICT_CHECKING="no"


I can't remember what the default setting is, but setting it to "yes" will make all net.* services finish starting before it proceeds with services that need "net".
Back to top
View user's profile Send private message
crowbert
Tux's lil' helper
Tux's lil' helper


Joined: 28 Apr 2003
Posts: 146

PostPosted: Fri Aug 31, 2007 2:49 am    Post subject: Reply with quote

It was set to "no" on my system, and changing it to "yes" mostly fixed it for me.

Still, there should be a way of specifying that some services require particular interfaces.

On my system:

ntp-client requires eth1
mysql requires eth0 and eth1
dhcpd requires eth1 and wlan0
local requires eth1

And it's important for local to run even if wlan0 fails to start, because I have local set to re-emerge ndiswrapper if the modules isn't there (for post-kernel upgrades).
Back to top
View user's profile Send private message
snIP3r
l33t
l33t


Joined: 21 May 2004
Posts: 853
Location: germany

PostPosted: Fri Aug 31, 2007 5:40 am    Post subject: Reply with quote

thx 2 all for your help!

i think i have enough info to fix this issue.

greets

snIP3r

p.s. i think i will leave this unsolved (even if its soilved for me) cause others seem to have questions about this also...
_________________
Intel i3-4130T on ASUS P9D-X
Kernel 5.15.88-gentoo SMP
-----------------------------------------------
if your problem is fixed please add something like [solved] to the topic!
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