1 |
On Fri, 12 May 2006 09:23:06 -0700, Drew Tomlinson wrote: |
2 |
|
3 |
> Every time there's a power outage at my home, my Gentoo box fails to |
4 |
> start. This is because it attempts to configure the network via DHCP |
5 |
> before my DHCP server has finished its startup. Thus I'm trying to |
6 |
> think of a way to get the Gentoo box to "wait" a few minutes if DHCP |
7 |
> fails on boot up. I've thought about making a simple script with the |
8 |
> 'sleep' command and putting it in the boot runlevel but I really don't |
9 |
> want it to wait on every reboot. Thus it seems there must be a way to |
10 |
> modify the network startup script so that if DHCP fails, then it sleeps |
11 |
> before trying again. Then maybe after so many DHCP failures, it |
12 |
> finally uses a static configuration. |
13 |
|
14 |
You can do all this in /etc/conf.d/net |
15 |
|
16 |
# set the dhcp timeout to 3 minutes |
17 |
dhcpcd_eth0="-t 180" |
18 |
|
19 |
# create static fallback options |
20 |
fallback_eth0=( "192.168.0.2 netmask 255.255.255.0" ) |
21 |
fallback_route_eth0=( "default via 192.168.0.1" ) |
22 |
|
23 |
See /etc/conf.d/net.example |
24 |
|
25 |
|
26 |
-- |
27 |
Neil Bothwick |
28 |
|
29 |
Orcs aren't all that bad... if you have plenty of ketchup. |