aboutsummaryrefslogtreecommitdiffstats
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:05:07 +0300
commitc19e5d19ae8e6e6eb9b37549d80765b8315f79a4 (patch)
tree9e1b49d31bb4f9bf3e0f87d783405ea2ff99a896 /scripts/runqemu-gen-tapdevs
parent681bcd2783e100dd2882273f28f16ef118161e89 (diff)
downloadopenembedded-core-contrib-c19e5d19ae8e6e6eb9b37549d80765b8315f79a4.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 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
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
exit 1
fi
-IFCONFIG=`which ifconfig 2> /dev/null`
+IFCONFIG=`which ip 2> /dev/null`
if [ -z "$IFCONFIG" ]; then
# Is it ever anywhere else?
- IFCONFIG=/sbin/ifconfig
+ IFCONFIG=/sbin/ip
fi
if [ ! -x "$IFCONFIG" ]; then
echo "$IFCONFIG cannot be executed"
@@ -70,7 +70,7 @@ if [ ! -x "$IFCONFIG" ]; then
fi
# Ensure we start with a clean slate
-for tap in `$IFCONFIG | grep ^tap | awk '{ print \$1 }' | sed s/://`; do
+for tap in `$IFCONFIG link | grep tap | awk '{ print \$2 }' | sed s/://`; do
echo "Note: Destroying pre-existing tap interface $tap..."
$TUNCTL -d $tap
done