summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Garman <scott.a.garman@intel.com>2012-09-21 22:06:02 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-24 10:30:36 (GMT)
commite46be72a8e5d064b4b46d5b0c37d67bbb2ccae55 (patch)
tree80d8bb86ecb6dad6446a330fe440b7f0acbf7333
parent2f0a82b8a9d27760a80c4a60f3705ca85b81f120 (diff)
downloadpoky-e46be72a8e5d064b4b46d5b0c37d67bbb2ccae55.tar.gz
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 <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/runqemu-gen-tapdevs2
-rwxr-xr-xscripts/runqemu-internal2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/runqemu-gen-tapdevs b/scripts/runqemu-gen-tapdevs
index 2c1ff0e..f5be30a 100755
--- a/scripts/runqemu-gen-tapdevs
+++ b/scripts/runqemu-gen-tapdevs
@@ -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 }'`; do 73for tap in `$IFCONFIG | grep ^tap | awk '{ print \$1 }' | 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
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index 6e20dd7..6b8bb65 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -154,7 +154,7 @@ if [ ! -x "$IFCONFIG" ]; then
154 exit 1 154 exit 1
155fi 155fi
156 156
157POSSIBLE=`$IFCONFIG -a | grep '^tap' | awk '{print $1}'` 157POSSIBLE=`$IFCONFIG -a | grep '^tap' | awk '{print $1}' | sed s/://`
158TAP="" 158TAP=""
159LOCKFILE="" 159LOCKFILE=""
160for tap in $POSSIBLE; do 160for tap in $POSSIBLE; do