aboutsummaryrefslogtreecommitdiffstats
path: root/main/dhcp/02-dhclient-script-remove-bashisms.patch
diff options
context:
space:
mode:
authortcely <tcely@users.noreply.github.com>2018-08-03 20:48:05 -0400
committerLeonardo Arena <rnalrd@alpinelinux.org>2019-02-08 09:46:19 +0000
commit23fac33a7652137d3ae308436229dd6edb9940f6 (patch)
treee2c1df4e9b45b6a34b3f2a3de02449948562d097 /main/dhcp/02-dhclient-script-remove-bashisms.patch
parent0a859defe7146331cd48ef213f5b44f5e331ab87 (diff)
downloadaports-23fac33a7652137d3ae308436229dd6edb9940f6.tar.bz2
aports-23fac33a7652137d3ae308436229dd6edb9940f6.tar.xz
main/dhcp: remove bashisms from dhclient-script
Diffstat (limited to 'main/dhcp/02-dhclient-script-remove-bashisms.patch')
-rw-r--r--main/dhcp/02-dhclient-script-remove-bashisms.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/main/dhcp/02-dhclient-script-remove-bashisms.patch b/main/dhcp/02-dhclient-script-remove-bashisms.patch
new file mode 100644
index 0000000000..afa10484f9
--- /dev/null
+++ b/main/dhcp/02-dhclient-script-remove-bashisms.patch
@@ -0,0 +1,28 @@
+diff --git a/client/scripts/linux b/client/scripts/linux
+index 0c42969..2e7274b 100755
+--- 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
+@@ -428,7 +428,7 @@ case "$reason" in
+ # Check if any IPv6 address on this interface is marked as
+ # tentative.
+ ${ip} addr show ${interface} | grep inet6 | grep tentative \
+- &> /dev/null
++ > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ # Wait for duplicate address detection to complete or for
+ # the timeout specified as --dad-wait-time.
+@@ -437,7 +437,7 @@ case "$reason" in
+ # We're going to poll for the tentative flag every second.
+ sleep 1
+ ${ip} addr show ${interface} | grep inet6 | grep tentative \
+- &> /dev/null
++ > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ break;
+ fi