1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## dhclient-script-exit-status.dpatch by <apollock@debian.org>
4
## All lines beginning with `## DP:' are a description of the patch.
5
## DP: Use exit status 2, rather than 1, to indicate that binding failed,
6
## DP: so that unrelated errors do not result in DHCPDECLINE
9
diff -urNad dhcp3-3.0.2/client/dhclient.c /tmp/dpep.DiNW3N/dhcp3-3.0.2/client/dhclient.c
10
--- dhcp3-3.0.2/client/dhclient.c 2004-11-25 04:39:14.000000000 +1100
11
+++ /tmp/dpep.DiNW3N/dhcp3-3.0.2/client/dhclient.c 2005-06-15 12:51:38.952349445 +1000
13
/* If the BOUND/RENEW code detects another machine using the
14
offered address, it exits nonzero. We need to send a
15
DHCPDECLINE and toss the lease. */
16
- if (script_go (client)) {
17
+ if (script_go (client) == 2) {
18
make_decline (client, client -> new);
19
send_decline (client);
20
destroy_client_lease (client -> new);