]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
runqemu-if*: Rename confusing variable name
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 15 Jun 2023 16:58:30 +0000 (17:58 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 16 Jun 2023 14:38:18 +0000 (15:38 +0100)
The IFCONFIG variable is really the path to ip and hasn't been
ifconfig for a long time. Rename the variable to something less
confusing.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu-ifdown
scripts/runqemu-ifup

index 98ac7f07b3416c7ee2b0622a7012dee9ef1abd7e..78be28812d4a9ee6682e8cd9e92f6dc6075bc6ea 100755 (executable)
@@ -37,14 +37,14 @@ if !ip tuntap del $TAP mode tap 2>/dev/null; then
        exit 1
 fi
 
-IFCONFIG=`which ip 2> /dev/null`
-if [ "x$IFCONFIG" = "x" ]; then
+IPTOOL=`which ip 2> /dev/null`
+if [ "x$IPTOOL" = "x" ]; then
        # better than nothing...
-       IFCONFIG=/sbin/ip
+       IPTOOL=/sbin/ip
 fi
-if [ -x "$IFCONFIG" ]; then
-       if `$IFCONFIG link show $TAP > /dev/null 2>&1`; then
-               $IFCONFIG link del $TAP
+if [ -x "$IPTOOL" ]; then
+       if `$IPTOOL link show $TAP > /dev/null 2>&1`; then
+               $IPTOOL link del $TAP
        fi
 fi
 # cleanup the remaining iptables rules
index 237bf2a07b8be4f568bf90d893116717d76416e3..bbd624596ed9b450b9c886f97c152b718c678127 100755 (executable)
@@ -47,13 +47,13 @@ if [ -z $TAP ]; then
        exit 1
 fi
 
-IFCONFIG=`which ip 2> /dev/null`
-if [ "x$IFCONFIG" = "x" ]; then
+IPTOOL=`which ip 2> /dev/null`
+if [ "x$IPTOOL" = "x" ]; then
        # better than nothing...
-       IFCONFIG=/sbin/ip
+       IPTOOL=/sbin/ip
 fi
-if [ ! -x "$IFCONFIG" ]; then
-       echo "$IFCONFIG cannot be executed"
+if [ ! -x "$IPTOOL" ]; then
+       echo "$IPTOOL cannot be executed"
        exit 1
 fi
 
@@ -67,13 +67,13 @@ if [ ! -x "$IPTABLES" ]; then
 fi
 
 n=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ]
-$IFCONFIG addr add 192.168.7.$n/32 broadcast 192.168.7.255 dev $TAP
+$IPTOOL addr add 192.168.7.$n/32 broadcast 192.168.7.255 dev $TAP
 STATUS=$?
 if [ $STATUS -ne 0 ]; then
     echo "Failed to set up IP addressing on $TAP"
     exit 1
 fi
-$IFCONFIG link set dev $TAP up
+$IPTOOL link set dev $TAP up
 STATUS=$?
 if [ $STATUS -ne 0 ]; then
     echo "Failed to bring up $TAP"
@@ -81,7 +81,7 @@ if [ $STATUS -ne 0 ]; then
 fi
 
 dest=$[ (`echo $TAP | sed 's/tap//'` * 2) + 2 ]
-$IFCONFIG route add to 192.168.7.$dest dev $TAP
+$IPTOOL route add to 192.168.7.$dest dev $TAP
 STATUS=$?
 if [ $STATUS -ne 0 ]; then
     echo "Failed to add route to 192.168.7.$dest using $TAP"