Browse Source

Wait at least two seconds for DHCP client to exit

r17158
master
Thomas Hood 18 years ago
parent
commit
8b66692770
  1. 1
      debian/changelog
  2. 7
      dhcp.c

1
debian/changelog

@ -27,6 +27,7 @@ netcfg (0.71) UNRELEASED; urgency=low
+ Write host-name provided to the DHCP client in order to get a lease
on the "hostname" option line for the interface in /e/n/i
+ If the user backs up from netcfg/get_hostname, go to retry question
+ Wait at least two seconds for DHCP client to exit (Closes: #255984)
+ Clean up code
. Always use spaces for indentation
. Improve comments

7
dhcp.c

@ -187,8 +187,11 @@ int poll_dhcp_client (struct debconfclient *client)
debconf_progress_info(client, "netcfg/dhcp_progress_note");
netcfg_progress_displayed = 1;
/* wait DHCP_SECONDS seconds for a DHCP lease */
while ((dhcp_pid > 0) && (seconds_slept < DHCP_SECONDS)) {
/* wait between 2 and DHCP_SECONDS seconds for a DHCP lease */
while (
((dhcp_pid > 0) || (seconds_slept < 2))
&& (seconds_slept < DHCP_SECONDS)
) {
sleep(1);
seconds_slept++; /* Not exact but close enough */
debconf_progress_step(client, 1);

Loading…
Cancel
Save