summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu-gen-tapdevs
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-gen-tapdevs
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-gen-tapdevs')
-rwxr-xr-xscripts/runqemu-gen-tapdevs6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/runqemu-gen-tapdevs b/scripts/runqemu-gen-tapdevs
index f5be30ac32..d3b27be291 100755
--- a/scripts/runqemu-gen-tapdevs
+++ b/scripts/runqemu-gen-tapdevs
@@ -59,10 +59,10 @@ if [ ! -x "$RUNQEMU_IFUP" ]; then
59 exit 1 59 exit 1
60fi 60fi
61 61
62IFCONFIG=`which ifconfig 2> /dev/null` 62IFCONFIG=`which ip 2> /dev/null`
63if [ -z "$IFCONFIG" ]; then 63if [ -z "$IFCONFIG" ]; then
64 # Is it ever anywhere else? 64 # Is it ever anywhere else?
65 IFCONFIG=/sbin/ifconfig 65 IFCONFIG=/sbin/ip
66fi 66fi
67if [ ! -x "$IFCONFIG" ]; then 67if [ ! -x "$IFCONFIG" ]; then
68 echo "$IFCONFIG cannot be executed" 68 echo "$IFCONFIG cannot be executed"
@@ -70,7 +70,7 @@ if [ ! -x "$IFCONFIG" ]; then
70fi 70fi
71 71
72# Ensure we start with a clean slate 72# Ensure we start with a clean slate
73for tap in `$IFCONFIG | grep ^tap | awk '{ print \$1 }' | sed s/://`; do 73for tap in `$IFCONFIG link | grep tap | awk '{ print \$2 }' | sed s/://`; do
74 echo "Note: Destroying pre-existing tap interface $tap..." 74 echo "Note: Destroying pre-existing tap interface $tap..."
75 $TUNCTL -d $tap 75 $TUNCTL -d $tap
76done 76done