From 7b87f203c2e6b7523a61adb22fa92ef2febb2fa3 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 15 Jun 2023 17:58:30 +0100 Subject: runqemu-if*: Rename confusing variable name 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. (From OE-Core rev: eb1c947a056f3e2c80e46e5e606423e85da46caa) Signed-off-by: Richard Purdie --- scripts/runqemu-ifup | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'scripts/runqemu-ifup') diff --git a/scripts/runqemu-ifup b/scripts/runqemu-ifup index 237bf2a07b..bbd624596e 100755 --- a/scripts/runqemu-ifup +++ b/scripts/runqemu-ifup @@ -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" -- cgit v1.2.3-54-g00ecf