Summary: | [patch] dhclient(8): the link check by dhclient slows down booting on a laptop | ||
---|---|---|---|
Product: | Base System | Reporter: | Nick Hibma <n_hibma> |
Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
Status: | Open --- | ||
Severity: | Affects Only Me | Keywords: | patch |
Priority: | Normal | ||
Version: | Unspecified | ||
Hardware: | Any | ||
OS: | Any |
Description
Nick Hibma
2006-06-06 06:30:17 UTC
Currently, the "no link"-timeout is wired-in (10 seconds) in line 364. It's probably the best solution to add a linkdown-timeout-option to dhclient.conf where the timeout can be set (as all the other timeouts). State Changed From-To: open->suspended Mark suspended awaiting patches. I actually did a patch quite some time ago. Below a block of code is simply moved from one spot to another. Index: dhclient.c =================================================================== --- dhclient.c (revision 184060) +++ dhclient.c (working copy) @@ -371,22 +371,6 @@ read_client_conf(); - if (!interface_link_status(ifi->name)) { - fprintf(stderr, "%s: no link ...", ifi->name); - fflush(stderr); - sleep(1); - while (!interface_link_status(ifi->name)) { - fprintf(stderr, "."); - fflush(stderr); - if (++i > 10) { - fprintf(stderr, " giving up\n"); - exit(1); - } - sleep(1); - } - fprintf(stderr, " got link\n"); - } - if ((nullfd = open(_PATH_DEVNULL, O_RDWR, 0)) == -1) error("cannot open %s: %m", _PATH_DEVNULL); @@ -438,6 +422,22 @@ if (immediate_daemon) go_daemon(); + if (!interface_link_status(ifi->name)) { + fprintf(stderr, "%s: no link ...", ifi->name); + fflush(stderr); + sleep(1); + while (!interface_link_status(ifi->name)) { + fprintf(stderr, "."); + fflush(stderr); + if (++i > 10) { + fprintf(stderr, " giving up\n"); + exit(1); + } + sleep(1); + } + fprintf(stderr, " got link\n"); + } + ifi->client->state = S_INIT; state_reboot(ifi); State Changed From-To: suspended->open Patch received. For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped Keyword: patch or patch-ready – in lieu of summary line prefix: [patch] * bulk change for the keyword * summary lines may be edited manually (not in bulk). Keyword descriptions and search interface: <https://bugs.freebsd.org/bugzilla/describekeywords.cgi> |