[pkg-dhcp-devel] [apollock at debian.org: Old DHCP patch to exit 2 if binding fails]
apollock at debian.org
Mon Jul 13 15:36:58 UTC 2009
On Mon, Jul 13, 2009 at 10:51:36AM +0100, Matt Zimmerman wrote:
> The story behind this patch is that I made a mistake which resulted in
> dhclient-script exiting with status 1 (I don't recall exactly how; I think
> it was a typo in one of the hooks). dhcpd interpreted this to mean that the
> lease was found to be unusable, and issued DHCPDECLINE to the server.
> The server immediately issued me a new lease, which triggered the same
> error, and another DHCPDECLINE, ad infinitum.
> ...well, not quite infinitum, but it *very* quickly exhausted all available
> DHCP leases, causing a local outage which I had to call my ISP and explain.
> The idea of the patch was to use a distinct exit code for "this lease is no
> good" which wouldn't be confused with "there was an error executing one of
> the hooks". In retrospect, 2 is probably not an ideal choice, as I think
> the shell will generate that as an error exit code in some cases.
> Does that help clarify things?
Oh yes, greatly, thanks very much. The next thing I need to do is make sure
that dhclient-script is doing the right thing at the right places, I don't
think it currently is. I will discuss this patch with upstream.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the pkg-dhcp-devel