From: Scott Garman Date: Fri, 21 Sep 2012 22:06:02 +0000 (-0700) Subject: runqemu: work with tap device names that end with a colon X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e46be72a8e5d064b4b46d5b0c37d67bbb2ccae55;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git runqemu: work with tap device names that end with a colon On Fedora systems (and likely others), ifconfig returns interface names that end with a colon. Make sure we strip the colon off the tap device name before using it. This fixes [YOCTO #3028] (From OE-Core rev: 85ed217b603a86113dda11d952850e8ceed30795) Signed-off-by: Scott Garman Signed-off-by: Richard Purdie --- diff --git a/scripts/runqemu-gen-tapdevs b/scripts/runqemu-gen-tapdevs index 2c1ff0eefbc..f5be30ac32f 100755 --- a/scripts/runqemu-gen-tapdevs +++ b/scripts/runqemu-gen-tapdevs @@ -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 }'`; do +for tap in `$IFCONFIG | grep ^tap | awk '{ print \$1 }' | sed s/://`; do echo "Note: Destroying pre-existing tap interface $tap..." $TUNCTL -d $tap done diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal index 6e20dd75120..6b8bb6520ea 100755 --- a/scripts/runqemu-internal +++ b/scripts/runqemu-internal @@ -154,7 +154,7 @@ if [ ! -x "$IFCONFIG" ]; then exit 1 fi -POSSIBLE=`$IFCONFIG -a | grep '^tap' | awk '{print $1}'` +POSSIBLE=`$IFCONFIG -a | grep '^tap' | awk '{print $1}' | sed s/://` TAP="" LOCKFILE="" for tap in $POSSIBLE; do