diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-15 17:59:06 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-16 15:40:11 +0100 |
commit | 609fc157180778025b2f416736839a7935217731 (patch) | |
tree | 493497d19c1d82190bcf39a18c7dfe8031f60d0e /scripts/runqemu-ifdown | |
parent | 3ee077f991e7810bf515783058be940a4b8f6adc (diff) | |
download | poky-609fc157180778025b2f416736839a7935217731.tar.gz |
runqemu/qemu-helper: Drop tunctl
ip tuntap provides the functionality that we obtained from tunctl. We only
needed tunctl when ifconfig was more available than ip. That isn't the case
now so we can drop tunctl and all the hoops we need to jump through to build
and provide it.
(From OE-Core rev: 2abfbca690ff00cb58ce08a65cde006578ee3de9)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu-ifdown')
-rwxr-xr-x | scripts/runqemu-ifdown | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/scripts/runqemu-ifdown b/scripts/runqemu-ifdown index f72166b32b..98ac7f07b3 100755 --- a/scripts/runqemu-ifdown +++ b/scripts/runqemu-ifdown | |||
@@ -1,8 +1,7 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | # | 2 | # |
3 | # QEMU network configuration script to bring down tap devices. This | 3 | # QEMU network configuration script to bring down tap devices. This |
4 | # utility needs to be run as root, and will use the tunctl binary | 4 | # utility needs to be run as root, and will use the ip utility |
5 | # from the native sysroot. | ||
6 | # | 5 | # |
7 | # If you find yourself calling this script a lot, you can add the | 6 | # If you find yourself calling this script a lot, you can add the |
8 | # the following to your /etc/sudoers file to be able to run this | 7 | # the following to your /etc/sudoers file to be able to run this |
@@ -34,13 +33,8 @@ TAP=$1 | |||
34 | STAGING_BINDIR_NATIVE=$2 | 33 | STAGING_BINDIR_NATIVE=$2 |
35 | 34 | ||
36 | if !ip tuntap del $TAP mode tap 2>/dev/null; then | 35 | if !ip tuntap del $TAP mode tap 2>/dev/null; then |
37 | TUNCTL=$STAGING_BINDIR_NATIVE/tunctl | 36 | echo "Error: Unable to run up tuntap del" |
38 | if [ ! -e "$TUNCTL" ]; then | 37 | exit 1 |
39 | echo "Error: Unable to find tunctl binary in '$STAGING_BINDIR_NATIVE', please bitbake qemu-helper-native" | ||
40 | exit 1 | ||
41 | fi | ||
42 | |||
43 | $TUNCTL -d $TAP | ||
44 | fi | 38 | fi |
45 | 39 | ||
46 | IFCONFIG=`which ip 2> /dev/null` | 40 | IFCONFIG=`which ip 2> /dev/null` |