diff options
author | Mike Frysinger <vapier@chromium.org> | 2018-01-09 18:40:41 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2018-01-09 18:40:50 -0500 |
commit | 333b1e3a9086215ff466114e1762172ef3124ee3 (patch) | |
tree | 2b5c319437166205b5a93308f6f4cc135fadc5c4 /sys-apps/iproute2/files | |
parent | sys-apps/gentoo-functions: mark 0.12 m68k/s390/sh stable (diff) | |
download | gentoo-333b1e3a9086215ff466114e1762172ef3124ee3.tar.gz gentoo-333b1e3a9086215ff466114e1762172ef3124ee3.tar.bz2 gentoo-333b1e3a9086215ff466114e1762172ef3124ee3.zip |
sys-apps/iproute2: clean up scripts to use /bin/sh only
Diffstat (limited to 'sys-apps/iproute2/files')
-rw-r--r-- | sys-apps/iproute2/files/iproute2-4.14.1-posix-shell.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/sys-apps/iproute2/files/iproute2-4.14.1-posix-shell.patch b/sys-apps/iproute2/files/iproute2-4.14.1-posix-shell.patch new file mode 100644 index 000000000000..e5efc9068cee --- /dev/null +++ b/sys-apps/iproute2/files/iproute2-4.14.1-posix-shell.patch @@ -0,0 +1,65 @@ +https://marc.info/?l=linux-netdev&m=151554000532498&w=2 + +From aec69bbc285e5498add5384b6018564355594233 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@chromium.org> +Date: Tue, 9 Jan 2018 18:16:53 -0500 +Subject: [PATCH iproute2] ifcfg/rtpr: convert to POSIX shell + +These files are already mostly written in POSIX shell, so convert their +shebangs to /bin/sh and tweak the few bashisms in here. + +URL: https://crbug.com/756559 +Reported-by: Pat Erley <perley@chromium.org> +Signed-off-by: Mike Frysinger <vapier@chromium.org> +--- + ip/ifcfg | 12 ++++++------ + ip/rtpr | 2 +- + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/ip/ifcfg b/ip/ifcfg +index 851b9215ab63..5b34decd4480 100644 +--- a/ip/ifcfg ++++ b/ip/ifcfg +@@ -1,3 +1,3 @@ +-#! /bin/bash ++#! /bin/sh + + CheckForwarding () { +@@ -7,7 +7,7 @@ CheckForwarding () { + fwd=0 + if [ -d $sbase ]; then + for dir in $sbase/*/forwarding; do +- fwd=$[$fwd + `cat $dir`] ++ fwd=$(( fwd + $(cat "$dir") )) + done + else + fwd=2 +@@ -128,12 +128,12 @@ fi + arping -q -A -c 1 -I $dev $ipaddr + noarp=$? + ( sleep 2 ; +- arping -q -U -c 1 -I $dev $ipaddr ) >& /dev/null </dev/null & ++ arping -q -U -c 1 -I $dev $ipaddr ) >/dev/null 2>&1 </dev/null & + +-ip route add unreachable 224.0.0.0/24 >& /dev/null +-ip route add unreachable 255.255.255.255 >& /dev/null ++ip route add unreachable 224.0.0.0/24 >/dev/null 2>&1 ++ip route add unreachable 255.255.255.255 >/dev/null 2>&1 + if [ "`ip link ls $dev | grep -c MULTICAST`" -ge 1 ]; then +- ip route add 224.0.0.0/4 dev $dev scope global >& /dev/null ++ ip route add 224.0.0.0/4 dev $dev scope global >/dev/null 2>&1 + fi + + if [ $fwd -eq 0 ]; then +diff --git a/ip/rtpr b/ip/rtpr +index 192a476f817e..7e48674bcf53 100644 +--- a/ip/rtpr ++++ b/ip/rtpr +@@ -1,3 +1,3 @@ +-#! /bin/bash ++#! /bin/sh + + exec tr "[\\\\]" "[ +-- +2.15.1 + |