mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-11-03 01:13:20 +00:00
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>
This commit is contained in:
parent
54f5991acd
commit
a8b970d7d2
12
ip/ifcfg
12
ip/ifcfg
@ -1,4 +1,4 @@
|
||||
#! /bin/bash
|
||||
#! /bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user