summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch
diff options
context:
space:
mode:
authorakuster <akuster808@gmail.com>2020-09-01 08:22:34 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-02 16:00:46 +0100
commit8d7db36ecb19cb775ecc8d0522ded3e55b53c820 (patch)
tree24f55c645f353175b09f298933ce3d72b85a7fc1 /meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch
parent6d60518854c5aab7f58bd9f010d8868d5820bb25 (diff)
downloadpoky-8d7db36ecb19cb775ecc8d0522ded3e55b53c820.tar.gz
dhcp: remove from core
update maintainers.inc too (From OE-Core rev: 7e3357892f204788162747e907d68f857118cf42) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch')
-rw-r--r--meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch65
1 files changed, 0 insertions, 65 deletions
diff --git a/meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch b/meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch
deleted file mode 100644
index 2359381b93..0000000000
--- a/meta/recipes-connectivity/dhcp/dhcp/0001-workaround-busybox-limitation-in-linux-dhclient-script.patch
+++ /dev/null
@@ -1,65 +0,0 @@
1From eec0503cfc36f63d777f5cb3f2719cecedcb8468 Mon Sep 17 00:00:00 2001
2From: Haris Okanovic <haris.okanovic@ni.com>
3Date: Mon, 7 Jan 2019 13:22:09 -0600
4Subject: [PATCH] Workaround busybox limitation in Linux dhclient-script
5
6Busybox is a lightweight implementation of coreutils commonly used on
7space-constrained embedded Linux distributions. It's implementation of
8chown and chmod doesn't provide a "--reference" option added to
9client/scripts/linux as of commit 9261cb14. This change works around
10that limitation by using stat to read ownership and permissions flags
11and simple chown/chmod calls supported in both coreutils and busybox.
12
13 modified: client/scripts/linux
14
15Signed-off-by: Haris Okanovic <haris.okanovic@ni.com>
16Upstream-Status: Pending [ISC-Bugs #48771]
17---
18 client/scripts/linux | 17 +++++++++++++----
19 1 file changed, 13 insertions(+), 4 deletions(-)
20
21diff --git a/client/scripts/linux b/client/scripts/linux
22index 0c429697..2435a44b 100755
23--- a/client/scripts/linux
24+++ b/client/scripts/linux
25@@ -32,6 +32,17 @@
26 # if your system holds ip tool in a non-standard location.
27 ip=/sbin/ip
28
29+chown_chmod_by_reference() {
30+ local reference_file="$1"
31+ local target_file="$2"
32+
33+ local owner=$(stat -c "%u:%g" "$reference_file")
34+ local perm=$(stat -c "%a" "$reference_file")
35+
36+ chown "$owner" "$target_file"
37+ chmod "$perm" "$target_file"
38+}
39+
40 # update /etc/resolv.conf based on received values
41 # This updated version mostly follows Debian script by Andrew Pollock et al.
42 make_resolv_conf() {
43@@ -74,8 +85,7 @@ make_resolv_conf() {
44 fi
45
46 if [ -f /etc/resolv.conf ]; then
47- chown --reference=/etc/resolv.conf $new_resolv_conf
48- chmod --reference=/etc/resolv.conf $new_resolv_conf
49+ chown_chmod_by_reference /etc/resolv.conf $new_resolv_conf
50 fi
51 mv -f $new_resolv_conf /etc/resolv.conf
52 # DHCPv6
53@@ -101,8 +111,7 @@ make_resolv_conf() {
54 fi
55
56 if [ -f /etc/resolv.conf ]; then
57- chown --reference=/etc/resolv.conf $new_resolv_conf
58- chmod --reference=/etc/resolv.conf $new_resolv_conf
59+ chown_chmod_by_reference /etc/resolv.conf $new_resolv_conf
60 fi
61 mv -f $new_resolv_conf /etc/resolv.conf
62 fi
63--
642.20.0
65