On 22 June 2023 19:01, [email protected] wrote:
> 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 <[email protected]>
> ---
>  scripts/runqemu-ifup | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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)

You can combine the cut+grep+sed to `sed "/^$OE_TAP_NAME/!d; s///; s/:.*//"`


Regards,

Jörg Sommer

Software Developer / Programmierer
--

Navimatix GmbH

Tatzendpromenade 2

07745 Jena
      

T: 03641 - 327 99 0

F: 03641 - 526 306

M: [email protected]

www.navimatix.de
      



Geschäftsführer: Steffen Späthe, Jan Rommeley

Registergericht: Amtsgericht Jena, HRB 501480


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183315): 
https://lists.openembedded.org/g/openembedded-core/message/183315
Mute This Topic: https://lists.openembedded.org/mt/99702217/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to