summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/dhcp/dhcp
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-26 08:56:30 +0100
commitb261791d69b2fc977819103c0685eaf440c5dfd0 (patch)
tree0e8a08770aeb745a80d23464c5791b5c3b7b57f5 /meta/recipes-connectivity/dhcp/dhcp
parent21916fe5b62ab4dbae22a43161c883c820738683 (diff)
downloadpoky-b261791d69b2fc977819103c0685eaf440c5dfd0.tar.gz
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. (From OE-Core rev: acd7b33d136fac52e1da7ce1bb3edd2a938b1b6f) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/dhcp/dhcp')
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/remove-dhclient-script-bash-dependency.patch55
1 files changed, 55 insertions, 0 deletions
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 @@
1From 8aed2a9ff09cb0d584ad0a7340fe3a596879d9b1 Mon Sep 17 00:00:00 2001
2From: Andre McCurdy <armccurdy@gmail.com>
3Date: Thu, 21 Jul 2016 19:07:02 -0700
4Subject: [PATCH] remove dhclient-script bash dependency
5
6Take the dash compatible IPv6 link-local address test from the Debian
7version of dhclient-script.
8
9Note that although "echo -e" in the OE version of dhclient-script is
10technically bash specific too, it is supported by Busybox echo when
11Busybox is configured with CONFIG_FEATURE_FANCY_ECHO enabled (which
12is the default in the OE Busybox defconfig) therefore leave as-is.
13
14Upstream-Status: Inappropriate [OE specific]
15
16Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
17---
18 client/scripts/linux | 7 +++----
19 1 file changed, 3 insertions(+), 4 deletions(-)
20
21diff --git a/client/scripts/linux b/client/scripts/linux
22index 232a0aa..1383f46 100755
23--- a/client/scripts/linux
24+++ b/client/scripts/linux
25@@ -1,4 +1,4 @@
26-#!/bin/bash
27+#!/bin/sh
28 # dhclient-script for Linux. Dan Halbert, March, 1997.
29 # Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
30 # No guarantees about this. I'm a novice at the details of Linux
31@@ -47,11 +47,11 @@ make_resolv_conf() {
32 if [ "x${new_dhcp6_domain_search}" != x ] ; then
33 resolv_conf="search ${new_dhcp6_domain_search}\n"
34 fi
35- shopt -s nocasematch
36 for nameserver in ${new_dhcp6_name_servers} ; do
37 # If the nameserver has a link-local address
38 # add a <zone_id> (interface name) to it.
39- if [[ "$nameserver" =~ ^fe80:: ]]
40+ if [ "${nameserver##fe80::}" != "$nameserver" ] ||
41+ [ "${nameserver##FE80::}" != "$nameserver" ]
42 then
43 zone_id="%$interface"
44 else
45@@ -59,7 +59,6 @@ make_resolv_conf() {
46 fi
47 resolv_conf="${resolv_conf}nameserver ${nameserver}$zone_id\n"
48 done
49- shopt -u nocasematch
50
51 echo -e "${resolv_conf}" > /etc/resolv.conf
52 fi
53--
541.9.1
55