On Fri, 12 May 2006 09:23:06 -0700, Drew Tomlinson wrote:

> Every time there's a power outage at my home, my Gentoo box fails to 
> start.  This is because it attempts to configure the network via DHCP 
> before my DHCP server has finished its startup.  Thus I'm trying to 
> think of a way to get the Gentoo box to "wait" a few minutes if DHCP 
> fails on boot up.  I've thought about making a simple script with the 
> 'sleep' command and putting it in the boot runlevel but I really don't 
> want it to wait on every reboot.  Thus it seems there must be a way to 
> modify the network startup script so that if DHCP fails, then it sleeps 
> before trying again.  Then maybe after so many DHCP failures, it
> finally uses a static configuration.

You can do all this in /etc/conf.d/net

# set the dhcp timeout to 3 minutes
dhcpcd_eth0="-t 180" 

# create static fallback options
fallback_eth0=( "192.168.0.2 netmask 255.255.255.0" )
fallback_route_eth0=( "default via 192.168.0.1" )

See /etc/conf.d/net.example


-- 
Neil Bothwick

Orcs aren't all that bad... if you have plenty of ketchup.

Attachment: signature.asc
Description: PGP signature

Reply via email to