# slow to evaluate eth0 availability

## oregonshoegazer

thanks to the power of the gentoo forum, my wireless card is up and running.  kudos to chadh and everyone else in the PCMCIA topics for their assistance.

but now, when i boot up without my eth0 (cat5) connection, it seems to take a really long time in the boot process to realize that "hmm... there's no cable here."  shouldn't this be a open/shut type of decision?  right now, it takes the boot process around a minute.

or can i tweak the amount of time that the boot process will spend waiting to hear back from a particular connection?

thanks again for the help.

-orsg

----------

## oregonshoegazer

well... after a bit of digging, i think i want to change the driver startup options for my NIC.  (/usr/src/linux/drivers/net/3c59x.c ?)

i'm using 3c59x, and there are a few timeout variables in there i can tweak.  does this sound like a probable solution?  anyone messed around with anything like this?  

also, i'll repeat my previous question, "why doesn't the driver just check the availability of the NIC and keep going?"  the default delay involved in 'looking' for a connection seems strangely time-consuming.  seems to me that it should just give up quickly and continue the boot process.

thanks for your input.

----------

## fifthcent

The reason why it is taking so long is because bringing up the network interface involves the  program 'dhcpcd', which seems to default to a 60 second timeout. After checking the man page for dhcpcd, it would seem you can use the '-t [TIMEOUT]' to change the timeout delay. So what your going to have to do is edit your /etc/init.d/net.ethX (where X is the interface number).

Here's the part you'll want to change (shortly after start()   ):

```
else

    /sbin/dhcpcd ${dhcp_args} ${IFACE} >/dev/null || {

        retval=$?

        eend ${retval} "Failed to bring ${IFACE} up"

        return ${retval}

    }

fi

```

Which should be changed to:

```
else

    /sbin/dhcpcd -t 5 ${dhcp_args} ${IFACE} >/dev/null || {

        retval=$?

        eend ${retval} "Failed to bring ${IFACE} up"

        return ${retval}

    }

fi

```

This should set the timeout for 5 seconds, which should be more than enough time. Hope this helps.

----------

## oregonshoegazer

thanks!  works like a charm!  although now i'm wondering when i'm going to grab my cup of coffee in the morning...  that one minute pause was perfect for a fill-up.   :Wink: 

----------

## BradN

You can do it by putting "-t 5" in your dhcp_args variable in /etc/conf.d/net, instead of changing the script  :Smile: 

----------

