View previous topic :: View next topic |
Author |
Message |
snIP3r l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 21 May 2004 Posts: 853 Location: germany
|
Posted: Thu Aug 30, 2007 9:27 am Post subject: starting dhcpd at boot time after specific eth device |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Seek n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/1958634294479918780026b.gif)
Joined: 22 Jul 2007 Posts: 47 Location: Austria
|
Posted: Thu Aug 30, 2007 3:41 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Stever Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 01 Mar 2005 Posts: 151 Location: North Carolina
|
Posted: Thu Aug 30, 2007 4:00 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
crowbert Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 28 Apr 2003 Posts: 146
|
Posted: Fri Aug 31, 2007 2:49 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
snIP3r l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 21 May 2004 Posts: 853 Location: germany
|
Posted: Fri Aug 31, 2007 5:40 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|