Shouldn't "/etc/init.d/networking start" return ASAP?

Asked by Anton Mellit

When the service 'networking' starts/restarts it brings up all 'auto' interfaces and for those which are 'dhcp' it tries to get dhcp lease. The process can take very long time (>1min) which slows down boot and resume from standby. Should it instead return immediately and do the dhcp staff in the background? I think scripts in /etc/init.d are intended to just start and stop services, while such time consuming tasks as getting DHCP leases are jobs of the services daemons themselves.

Details:

my /etc/network/interfaces:

auto lo
iface lo inet loopback

iface ath0 inet dhcp
wireless-key s:*****
wireless-essid *****

auto ath0

iface eth0 inet dhcp

auto eth0

The problem: When I boot up or resume from standby it takes long

The reason: because the service "networking" gets restarted, it launches 'dhclient' for all interfaces and, especially for those connections which are not available, it waits for DHCP leases for a long time.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Florian Diesch (diesch) said :
#1

Some services assume a working network connection and are therefor started after 'networking'. If 'networking' would return before the network i sup they may be executed too early and fail.

You may remove the 'auto' lines for interfaces that are not always available.

Another way to speed things up is to allow script running in parallel setting the CONCURRENCY variable in /etc/init.d/rc (but I don't know any docs for the specific meaning of its values).

Can you help with this problem?

Provide an answer of your own, or ask Anton Mellit for more information if necessary.

To post a message you must log in.