diff --git a/meta-digi-dey/recipes-connectivity/dhcp/dhcp/0001-keep-resolv.conf-rights.patch b/meta-digi-dey/recipes-connectivity/dhcp/dhcp/0001-keep-resolv.conf-rights.patch new file mode 100644 index 000000000..30d5f705c --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/dhcp/dhcp/0001-keep-resolv.conf-rights.patch @@ -0,0 +1,46 @@ +From: Isaac Hermida +Date: Tue, 30 Jan 2018 17:00:29 +0100 +Subject: [PATCH] keep resolv.conf rights + +Option --reference does not exist for busybox chmod/chown, so you get an ugly +error and file rights are modified. + +https://jira.digi.com/browse/DEL-5642 + +Signed-off-by: Isaac Hermida +--- + client/scripts/linux | 14 ++++---------- + 1 file changed, 4 insertions(+), 10 deletions(-) + +diff --git a/client/scripts/linux b/client/scripts/linux +index 1712d7d195a3..7e3d217a7b95 100755 +--- a/client/scripts/linux ++++ b/client/scripts/linux +@@ -73,11 +73,8 @@ make_resolv_conf() { + sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf >>$new_resolv_conf + fi + +- if [ -f /etc/resolv.conf ]; then +- chown --reference=/etc/resolv.conf $new_resolv_conf +- chmod --reference=/etc/resolv.conf $new_resolv_conf +- fi +- mv -f $new_resolv_conf /etc/resolv.conf ++ cat $new_resolv_conf > /etc/resolv.conf ++ rm -f $new_resolv_conf + # DHCPv6 + elif [ -n "$new_dhcp6_domain_search" ] || [ -n "$new_dhcp6_name_servers" ]; then + new_resolv_conf=/etc/resolv.conf.dhclient-new +@@ -100,11 +97,8 @@ make_resolv_conf() { + sed -n /^\w*[Nn][Aa][Mm][Ee][Ss][Ee][Rr][Vv][Ee][Rr]/p /etc/resolv.conf >>$new_resolv_conf + fi + +- if [ -f /etc/resolv.conf ]; then +- chown --reference=/etc/resolv.conf $new_resolv_conf +- chmod --reference=/etc/resolv.conf $new_resolv_conf +- fi +- mv -f $new_resolv_conf /etc/resolv.conf ++ cat $new_resolv_conf > /etc/resolv.conf ++ rm -f $new_resolv_conf + fi + } + diff --git a/meta-digi-dey/recipes-connectivity/dhcp/dhcp_4.3.6.bbappend b/meta-digi-dey/recipes-connectivity/dhcp/dhcp_4.3.6.bbappend new file mode 100644 index 000000000..3e84852a1 --- /dev/null +++ b/meta-digi-dey/recipes-connectivity/dhcp/dhcp_4.3.6.bbappend @@ -0,0 +1,5 @@ +# Copyright (C) 2018, Digi International Inc. + +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:" + +SRC_URI += " file://0001-keep-resolv.conf-rights.patch"