From 8db3f0e97ebb7e74b2403b346cbb4b04630dc24b Mon Sep 17 00:00:00 2001 From: Corentin Henry Date: Wed, 20 Apr 2016 15:31:42 +0000 Subject: main/dhcp: add /sbin/dhclient-script fix https://bugs.alpinelinux.org/issues/4855 --- main/dhcp/dhclient-script.patch | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 main/dhcp/dhclient-script.patch (limited to 'main/dhcp/dhclient-script.patch') diff --git a/main/dhcp/dhclient-script.patch b/main/dhcp/dhclient-script.patch new file mode 100644 index 0000000000..c799a94ac4 --- /dev/null +++ b/main/dhcp/dhclient-script.patch @@ -0,0 +1,30 @@ +--- 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 +@@ -49,11 +49,11 @@ + if [ "x${new_dhcp6_domain_search}" != x ] ; then + echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 + fi +- shopt -s nocasematch + for nameserver in ${new_dhcp6_name_servers} ; do + # If the nameserver has a link-local address + # add a (interface name) to it. +- if [[ "$nameserver" =~ ^fe80:: ]] ++ echo $nameserver | tr '[:upper:]' '[:lower:]' | grep -E ^fe80:: > /dev/null ++ if [ $? -eq 0 ] + then + zone_id="%$interface" + else +@@ -61,7 +61,6 @@ + fi + echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6 + done +- shopt -u nocasematch + + mv /etc/resolv.conf.dhclient6 /etc/resolv.conf + fi -- cgit v1.2.3