aboutsummaryrefslogtreecommitdiffstats
path: root/main/dhcp/dhclient-script.patch
diff options
context:
space:
mode:
authorCorentin Henry <corentinhenry@gmail.com>2016-04-20 15:31:42 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-04-28 13:48:15 +0000
commit8db3f0e97ebb7e74b2403b346cbb4b04630dc24b (patch)
treed83dec432fab7f7da64e039b863f2942f02db30e /main/dhcp/dhclient-script.patch
parent4e82ca0a137b08a7a7bfdee098b474d9e9e6a861 (diff)
downloadaports-8db3f0e97ebb7e74b2403b346cbb4b04630dc24b.tar.bz2
aports-8db3f0e97ebb7e74b2403b346cbb4b04630dc24b.tar.xz
main/dhcp: add /sbin/dhclient-script
fix https://bugs.alpinelinux.org/issues/4855
Diffstat (limited to 'main/dhcp/dhclient-script.patch')
-rw-r--r--main/dhcp/dhclient-script.patch30
1 files changed, 30 insertions, 0 deletions
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 <zone_id> (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