summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2016-07-21 20:11:04 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-25 23:47:01 +0100
commitacd7b33d136fac52e1da7ce1bb3edd2a938b1b6f (patch)
treeaa9930312b664a02aa960a806070a20ed2035969
parente99a7220bbc2d605200d5005ba40bf45f6f8dcf5 (diff)
downloadopenembedded-core-contrib-acd7b33d136fac52e1da7ce1bb3edd2a938b1b6f.tar.gz
openembedded-core-contrib-acd7b33d136fac52e1da7ce1bb3edd2a938b1b6f.tar.bz2
openembedded-core-contrib-acd7b33d136fac52e1da7ce1bb3edd2a938b1b6f.zip
dhcp: remove dhclient-script bash dependency
Take the dash compatible IPv6 link-local address test from the Debian version of dhclient-script. Note that although "echo -e" in the OE version of dhclient-script is technically bash specific too, it is supported by Busybox echo when Busybox is configured with CONFIG_FEATURE_FANCY_ECHO enabled (which is the default in the OE Busybox defconfig) therefore leave as-is. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp.inc1
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/remove-dhclient-script-bash-dependency.patch55
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb1
3 files changed, 56 insertions, 1 deletions
diff --git a/meta/recipes-connectivity/dhcp/dhcp.inc b/meta/recipes-connectivity/dhcp/dhcp.inc
index d237d5824f..421221f388 100644
--- a/meta/recipes-connectivity/dhcp/dhcp.inc
+++ b/meta/recipes-connectivity/dhcp/dhcp.inc
@@ -95,7 +95,6 @@ FILES_${PN}-server-config = "${sysconfdir}/default/dhcp-server ${sysconfdir}/dhc
FILES_${PN}-relay = "${sbindir}/dhcrelay ${sysconfdir}/init.d/dhcp-relay ${sysconfdir}/default/dhcp-relay"
FILES_${PN}-client = "${base_sbindir}/dhclient ${base_sbindir}/dhclient-script ${sysconfdir}/dhcp/dhclient.conf"
-RDEPENDS_${PN}-client = "bash"
FILES_${PN}-omshell = "${bindir}/omshell"
diff --git a/meta/recipes-connectivity/dhcp/dhcp/remove-dhclient-script-bash-dependency.patch b/meta/recipes-connectivity/dhcp/dhcp/remove-dhclient-script-bash-dependency.patch
new file mode 100644
index 0000000000..997b9f6ba9
--- /dev/null
+++ b/meta/recipes-connectivity/dhcp/dhcp/remove-dhclient-script-bash-dependency.patch
@@ -0,0 +1,55 @@
+From 8aed2a9ff09cb0d584ad0a7340fe3a596879d9b1 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Thu, 21 Jul 2016 19:07:02 -0700
+Subject: [PATCH] remove dhclient-script bash dependency
+
+Take the dash compatible IPv6 link-local address test from the Debian
+version of dhclient-script.
+
+Note that although "echo -e" in the OE version of dhclient-script is
+technically bash specific too, it is supported by Busybox echo when
+Busybox is configured with CONFIG_FEATURE_FANCY_ECHO enabled (which
+is the default in the OE Busybox defconfig) therefore leave as-is.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ client/scripts/linux | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/client/scripts/linux b/client/scripts/linux
+index 232a0aa..1383f46 100755
+--- a/client/scripts/linux
++++ b/client/scripts/linux
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ # dhclient-script for Linux. Dan Halbert, March, 1997.
+ # Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
+ # No guarantees about this. I'm a novice at the details of Linux
+@@ -47,11 +47,11 @@ make_resolv_conf() {
+ if [ "x${new_dhcp6_domain_search}" != x ] ; then
+ resolv_conf="search ${new_dhcp6_domain_search}\n"
+ fi
+- shopt -s nocasematch
+ for nameserver in ${new_dhcp6_name_servers} ; do
+ # If the nameserver has a link-local address
+ # add a <zone_id> (interface name) to it.
+- if [[ "$nameserver" =~ ^fe80:: ]]
++ if [ "${nameserver##fe80::}" != "$nameserver" ] ||
++ [ "${nameserver##FE80::}" != "$nameserver" ]
+ then
+ zone_id="%$interface"
+ else
+@@ -59,7 +59,6 @@ make_resolv_conf() {
+ fi
+ resolv_conf="${resolv_conf}nameserver ${nameserver}$zone_id\n"
+ done
+- shopt -u nocasematch
+
+ echo -e "${resolv_conf}" > /etc/resolv.conf
+ fi
+--
+1.9.1
+
diff --git a/meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb b/meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb
index 9e082911bd..4151eb1836 100644
--- a/meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb
+++ b/meta/recipes-connectivity/dhcp/dhcp_4.3.4.bb
@@ -8,6 +8,7 @@ SRC_URI += "file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \
file://0001-site.h-enable-gentle-shutdown.patch \
file://libxml2-configure-argument.patch \
file://tweak-to-support-external-bind.patch \
+ file://remove-dhclient-script-bash-dependency.patch \
"
SRC_URI[md5sum] = "0138319fe2b788cf4bdf34fbeaf9ff54"