summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu-ifup
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2013-05-12 22:42:22 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-16 00:09:47 +0300
commit4520feca657ac543267b4c8840e57bb32baf18c3 (patch)
tree538c6732f1c7a51206faf834c8c4393fbe984a45 /scripts/runqemu-ifup
parentf259554b4e91eecbb009622a64e43c5619aedb92 (diff)
downloadpoky-4520feca657ac543267b4c8840e57bb32baf18c3.tar.gz
runqemu: Replace use of ifconfig with ip
ifconfig and its ilk (net-tools package) is deprecated in favour of iproute2 package and is now removed by many distro's e.g. Archlinux. So we replace ifconfig with ip utility (From OE-Core rev: c19e5d19ae8e6e6eb9b37549d80765b8315f79a4) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu-ifup')
-rwxr-xr-xscripts/runqemu-ifup6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/runqemu-ifup b/scripts/runqemu-ifup
index 0926faf439..8948153d5a 100755
--- a/scripts/runqemu-ifup
+++ b/scripts/runqemu-ifup
@@ -70,10 +70,10 @@ if [ $STATUS -ne 0 ]; then
70 fi 70 fi
71fi 71fi
72 72
73IFCONFIG=`which ifconfig 2> /dev/null` 73IFCONFIG=`which ip 2> /dev/null`
74if [ "x$IFCONFIG" = "x" ]; then 74if [ "x$IFCONFIG" = "x" ]; then
75 # better than nothing... 75 # better than nothing...
76 IFCONFIG=/sbin/ifconfig 76 IFCONFIG=/sbin/ip
77fi 77fi
78if [ ! -x "$IFCONFIG" ]; then 78if [ ! -x "$IFCONFIG" ]; then
79 echo "$IFCONFIG cannot be executed" 79 echo "$IFCONFIG cannot be executed"
@@ -100,7 +100,7 @@ if [ ! -x "$IPTABLES" ]; then
100fi 100fi
101 101
102n=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ] 102n=$[ (`echo $TAP | sed 's/tap//'` * 2) + 1 ]
103$IFCONFIG $TAP 192.168.7.$n netmask 255.255.255.255 103$IFCONFIG addr add 192.168.7.$n/32 dev $TAP
104 104
105dest=$[ (`echo $TAP | sed 's/tap//'` * 2) + 2 ] 105dest=$[ (`echo $TAP | sed 's/tap//'` * 2) + 2 ]
106$ROUTE add -host 192.168.7.$dest $TAP 106$ROUTE add -host 192.168.7.$dest $TAP