[oe-commits] Otavio Salvador : dhcp: use exit status 2 to indicate that binding failed

GIT User account git at amethyst.openembedded.net
Tue Jan 13 14:39:34 UTC 2009


Module: openembedded.git
Branch: org.openembedded.dev
Commit: d29faa595573ae683c66f7af4971ddfc435a2b5f
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=d29faa595573ae683c66f7af4971ddfc435a2b5f

Author: Otavio Salvador <otavio at ossystems.com.br>
Date:   Tue Jan 13 12:33:04 2009 -0200

dhcp: use exit status 2 to indicate that binding failed

This patch has been taken from Debian to improve the dbus handling by
dhcdbd.

---

 packages/dhcp/dhcp_3.0.2.bb                        |    3 ++-
 .../dhcp/files/dhclient-script-exit-status.dpatch  |   20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/packages/dhcp/dhcp_3.0.2.bb b/packages/dhcp/dhcp_3.0.2.bb
index 6b0f9de..f8d8508 100644
--- a/packages/dhcp/dhcp_3.0.2.bb
+++ b/packages/dhcp/dhcp_3.0.2.bb
@@ -2,10 +2,11 @@ SECTION = "console/network"
 DESCRIPTION = "Internet Software Consortium DHCP package"
 HOMEPAGE = "http://www.isc.org/"
 LICENSE = "BSD"
-PR = "r6"
+PR = "r7"
 SRC_URI = "ftp://ftp.isc.org/isc/dhcp/dhcp-3.0-history/dhcp-${PV}.tar.gz \
 	   file://noattrmode.patch;patch=1 \
 	   file://fixincludes.patch;patch=1 \
+           file://dhclient-script-exit-status.dpatch;patch=1 \
 	   file://dhcp-3.0.3-dhclient-dbus.patch;patch=1;pnum=0 \
 	   file://init-relay file://default-relay \
 	   file://init-server file://default-server \
diff --git a/packages/dhcp/files/dhclient-script-exit-status.dpatch b/packages/dhcp/files/dhclient-script-exit-status.dpatch
new file mode 100644
index 0000000..d075892
--- /dev/null
+++ b/packages/dhcp/files/dhclient-script-exit-status.dpatch
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## dhclient-script-exit-status.dpatch by  <apollock at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Use exit status 2, rather than 1, to indicate that binding failed,
+## DP: so that unrelated errors do not result in DHCPDECLINE
+
+ at DPATCH@
+diff -urNad dhcp3-3.0.2/client/dhclient.c /tmp/dpep.DiNW3N/dhcp3-3.0.2/client/dhclient.c
+--- dhcp3-3.0.2/client/dhclient.c	2004-11-25 04:39:14.000000000 +1100
++++ /tmp/dpep.DiNW3N/dhcp3-3.0.2/client/dhclient.c	2005-06-15 12:51:38.952349445 +1000
+@@ -869,7 +869,7 @@
+ 	/* If the BOUND/RENEW code detects another machine using the
+ 	   offered address, it exits nonzero.  We need to send a
+ 	   DHCPDECLINE and toss the lease. */
+-	if (script_go (client)) {
++	if (script_go (client) == 2) {
+ 		make_decline (client, client -> new);
+ 		send_decline (client);
+ 		destroy_client_lease (client -> new);





More information about the Openembedded-commits mailing list