From: Adrian Freihofer Date: Thu, 22 Jun 2023 17:01:24 +0000 (+0200) Subject: runqemu-ifup: remove only our taps X-Git-Tag: uninative-4.1~351 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f65fb5fce45d13c2881acd8295d417635449c52d;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git runqemu-ifup: remove only our taps If there are other tap interfaces than the interfaces created by the runqemu-* scripts, these interfaces are not ignored. This is now fixed by filtering the interfaces for a specific prefix in the interface name. Signed-off-by: Adrian Freihofer Signed-off-by: Luca Ceresoli Signed-off-by: Richard Purdie --- diff --git a/scripts/runqemu-ifup b/scripts/runqemu-ifup index fe4492e78b7..c65ceaf1c83 100755 --- a/scripts/runqemu-ifup +++ b/scripts/runqemu-ifup @@ -45,7 +45,7 @@ if [ -z "$OE_TAP_NAME" ]; then fi if taps=$(ip tuntap list 2>/dev/null); then - tap_no_last=$(echo "$taps" |cut -f 1 -d ":" |sed "s/$OE_TAP_NAME//g" | sort -rn | head -n 1) + tap_no_last=$(echo "$taps" |cut -f 1 -d ":" |grep -E "^$OE_TAP_NAME.*" |sed "s/$OE_TAP_NAME//g" | sort -rn | head -n 1) if [ -z "$tap_no_last" ]; then tap_no=0 else