Your message dated Wed, 24 Mar 2010 20:28:15 +0000 (WET)
with message-id <[email protected]>
and subject line Package dhcp has been removed from Debian
has caused the Debian Bug report #261660,
regarding -e switch causes daemon to exit
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
261660: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=261660
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dhcp
Version: 2.0pl5-19
Severity: normal
Tags: patch
The "-e" switch is a nice thing, which lets dhclient report an error to
such utilities as ifup, and thus helps keeping ifstate database
accurate. But imagine the following scenario:
1. the DHCP server is available
2. user runs ifup eth0
3. dhclient gets a lease and turns into a daemon
4. ifup notices dhclient "exit" and notes eth0 is up in ifstate
5. ...time passes...
6. DHCP server goes offline
7. ..some more time passes...
8. lease expires and dhclient wants to get a new one, but since the
server does not respond, it times out and exits (!)
9. DHCP server goes online
Now there are two problems:
- eth0 is down
- ifstate thinks eth0 is up
One way to improve the situation is to make "-e" cause dhclient to exit
only at the first try. I.e. if the DHCP server is down when the user
runs ifup, it will still return an error code to ifup. But if the DHCP
server is up initially, then there is no point in exiting AFTER dhclient
has went daemon mode, because ifup won't notice that anyway, and because
when dhclient hangs around, it might finally wait to see the server go
up.
My patch (attached) does exaclty that: turn off exit_on_panic flag after
first success.
I have tested it on my system and it seems to do what is intended.
regards,
Marcin
--
Marcin Owsiany <[email protected]> http://marcin.owsiany.pl/
GnuPG: 1024D/60F41216 FE67 DA2D 0ACA FC5E 3F75 D6F6 3A0D 8AA0 60F4 1216
--- dhclient.c.orig 2004-07-26 14:33:36.000000000 +0200
+++ dhclient.c 2004-07-26 14:48:04.000000000 +0200
@@ -631,6 +631,15 @@
ip -> client -> active -> renewal - cur_time);
ip -> client -> state = S_BOUND;
reinitialize_interfaces ();
+
+ /* If we have been asked to exit nonzero on bind failures... */
+ if (exit_on_panic) {
+ /* ... then forget that request from now on, because we are
+ * turning into a daemon now. Rationale: the only chance that
+ * exit(1) could be noticed by anyone (read: ifup) was at the
+ * first try, and apparently the fist try has just succeeded. */
+ exit_on_panic = 0;
+ }
go_daemon ();
}
--- End Message ---
--- Begin Message ---
Version: 2.0pl5dfsg1-20.2+rm
You filed the bug http://bugs.debian.org/261660 in Debian BTS
against the package dhcp. I'm closing it at *unstable*, but it will
remain open for older distributions.
For more information about this package's removal, read
http://bugs.debian.org/446386. That bug might give the reasons why
this package was removed and suggestions of possible replacements.
Don't hesitate to reply to this mail if you have any question.
Thank you for your contribution to Debian.
--
Marco Rodrigues
--- End Message ---