diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-15 17:58:30 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-16 15:40:11 +0100 |
commit | 7b87f203c2e6b7523a61adb22fa92ef2febb2fa3 (patch) | |
tree | bf1319a89eab45f5ed92003b3e82ea3cac0b0ee4 /scripts | |
parent | 609fc157180778025b2f416736839a7935217731 (diff) | |
download | poky-7b87f203c2e6b7523a61adb22fa92ef2febb2fa3.tar.gz |
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/runqemu-ifdown | 12 | ||||
-rwxr-xr-x | scripts/runqemu-ifup | 16 |
2 files changed, 14 insertions, 14 deletions
diff --git a/scripts/runqemu-ifdown b/scripts/runqemu-ifdown index 98ac7f07b3..78be28812d 100755 --- a/scripts/runqemu-ifdown +++ b/scripts/runqemu-ifdown | |||
@@ -37,14 +37,14 @@ if !ip tuntap del $TAP mode tap 2>/dev/null; then | |||
37 | exit 1 | 37 | exit 1 |
38 | fi | 38 | fi |
39 | 39 | ||
40 | IFCONFIG=`which ip 2> /dev/null` | 40 | IPTOOL=`which ip 2> /dev/null` |
41 | if [ "x$IFCONFIG" = "x" ]; then | 41 | if [ "x$IPTOOL" = "x" ]; then |
42 | # better than nothing... | 42 | # better than nothing... |
43 | IFCONFIG=/sbin/ip | 43 | IPTOOL=/sbin/ip |
44 | fi | 44 | fi |
45 | if [ -x "$IFCONFIG" ]; then | 45 | if [ -x "$IPTOOL" ]; then |
46 | if `$IFCONFIG link show $TAP > /dev/null 2>&1`; then | 46 | if `$IPTOOL link show $TAP > /dev/null 2>&1`; then |
47 | $IFCONFIG link del $TAP | 47 | $IPTOOL link del $TAP |
48 | fi | 48 | fi |
49 | fi | 49 | fi |
50 | # cleanup the remaining iptables rules | 50 | # cleanup the remaining iptables rules |
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 | |||
47 | exit 1 | 47 | exit 1 |
48 | fi | 48 | fi |
49 | 49 | ||
50 | IFCONFIG=`which ip 2> /dev/null` | 50 | IPTOOL=`which ip 2> /dev/null` |
51 | if [ "x$IFCONFIG" = "x" ]; then | 51 | if [ "x$IPTOOL" = "x" ]; then |
52 | # better than nothing... | 52 | # better than nothing... |
53 | IFCONFIG=/sbin/ip | 53 | IPTOOL=/sbin/ip |
54 | fi | 54 | fi |
55 | if [ ! -x "$IFCONFIG" ]; then | 55 | if [ ! -x "$IPTOOL" ]; then |
56 | echo "$IFCONFIG cannot be executed" | 56 | echo "$IPTOOL cannot be executed" |
57 | exit 1 | 57 | exit 1 |
58 | fi | 58 | fi |
59 | 59 | ||
@@ -67,13 +67,13 @@ if [ ! -x "$IPTABLES" ]; then | |||
67 | fi | 67 | fi |
68 | 68 | ||
69 | n=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ] | 69 | n=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ] |
70 | $IFCONFIG addr add 192.168.7.$n/32 broadcast 192.168.7.255 dev $TAP | 70 | $IPTOOL addr add 192.168.7.$n/32 broadcast 192.168.7.255 dev $TAP |
71 | STATUS=$? | 71 | STATUS=$? |
72 | if [ $STATUS -ne 0 ]; then | 72 | if [ $STATUS -ne 0 ]; then |
73 | echo "Failed to set up IP addressing on $TAP" | 73 | echo "Failed to set up IP addressing on $TAP" |
74 | exit 1 | 74 | exit 1 |
75 | fi | 75 | fi |
76 | $IFCONFIG link set dev $TAP up | 76 | $IPTOOL link set dev $TAP up |
77 | STATUS=$? | 77 | STATUS=$? |
78 | if [ $STATUS -ne 0 ]; then | 78 | if [ $STATUS -ne 0 ]; then |
79 | echo "Failed to bring up $TAP" | 79 | echo "Failed to bring up $TAP" |
@@ -81,7 +81,7 @@ if [ $STATUS -ne 0 ]; then | |||
81 | fi | 81 | fi |
82 | 82 | ||
83 | dest=$[ (`echo $TAP | sed 's/tap//'` * 2) + 2 ] | 83 | dest=$[ (`echo $TAP | sed 's/tap//'` * 2) + 2 ] |
84 | $IFCONFIG route add to 192.168.7.$dest dev $TAP | 84 | $IPTOOL route add to 192.168.7.$dest dev $TAP |
85 | STATUS=$? | 85 | STATUS=$? |
86 | if [ $STATUS -ne 0 ]; then | 86 | if [ $STATUS -ne 0 ]; then |
87 | echo "Failed to add route to 192.168.7.$dest using $TAP" | 87 | echo "Failed to add route to 192.168.7.$dest using $TAP" |