void-packages/srcpkgs/dhcp/patches/002_debashify.patch

31 lines
1.1 KiB
Diff
Raw Normal View History

2015-03-28 18:55:09 +01:00
--- client/scripts/linux.orig 2015-03-28 18:39:02.213070516 +0100
+++ client/scripts/linux 2015-03-28 18:38:54.187071116 +0100
@@ -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,10 @@ make_resolv_conf() {
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:: ]]
+ if echo "$nameserver" | grep -i "^fe80::" > /dev/null
then
zone_id="%$interface"
else
@@ -61,7 +60,6 @@ make_resolv_conf() {
fi
echo nameserver ${nameserver}$zone_id >> /etc/resolv.conf.dhclient6
done
- shopt -u nocasematch
mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
fi