# Laptop disable long dhcp period by booting

## selberbauer

Hi, i have a netbook with gentoo, because it is a protable device its most time connected via wlan to the network.

So i am needing net.eth0 rarely.

the crab is it now, that i cant get the net.et0 better the dhcpcd out of the runlevel, so that i have to wait every bootijng a long time until the dhcpcd checks thats thers no cable...

i tired already using softlevels from the howto but they dont really change something.

dhcpcd either net.eth0 are in the runlevel but they seem to be startet at a dependie from runlevel 2.

has somebody an idea bhow i can get rid of dhcpcd (net.eth0) when booting?

regards

----------

## ASID

Try to install emerge sys-apps/netplug or emerge sys-apps/ifplugd

Both can handle such situations.

 :Wink: 

----------

## cwr

Well, dhclient has a config in which the timeout delay can be set - I usually run it at 10 seconds

as opposed to the default (60 sec?).   The net eth0 tries to set an address by dhclient, and

if that fails falls back to a default.  At a guess, dhcpcd has something similar iin the way of

configuration for reducing the delay.

Oh, and on shutdown, have local.stop remove the /var/lib/dhcp/dhclient.leases file, or

whatever dhcpcd calls it; otherwise dhcp will probably waste time trying to re-open

the old lease.

Will

----------

## selberbauer

@cwr

how are the lines to set the timeout from dhcpcd?

@ASID

i think cwrs solution is better but i will try yours when the other doesnt work.

regards

----------

## cwr

I'm sorry, I've never used dhcpcd, but it must have a config file somewhere.  For dhclient,

the file is /etc/dhcp/dhclient.conf and the line "timeout 10;"

Will

----------

