diff options
Diffstat (limited to 'scripts/poky-qemu-internal')
-rwxr-xr-x | scripts/poky-qemu-internal | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal index c3720d9ce2..0ea38eef60 100755 --- a/scripts/poky-qemu-internal +++ b/scripts/poky-qemu-internal | |||
@@ -50,6 +50,10 @@ if [ -z "$QEMU_MEMORY" ]; then | |||
50 | 50 | ||
51 | fi | 51 | fi |
52 | 52 | ||
53 | # This flag file is created when poky-gen-tapdevs creates a bank of | ||
54 | # tap devices, indicating that the user does not have sudo privs. | ||
55 | NOSUDO_FLAG="/etc/poky-nosudo" | ||
56 | |||
53 | QEMUIFUP=`which poky-qemu-ifup` | 57 | QEMUIFUP=`which poky-qemu-ifup` |
54 | QEMUIFDOWN=`which poky-qemu-ifdown` | 58 | QEMUIFDOWN=`which poky-qemu-ifdown` |
55 | 59 | ||
@@ -81,6 +85,13 @@ for tap in $POSSIBLE; do | |||
81 | done | 85 | done |
82 | 86 | ||
83 | if [ "$TAP" = "" ]; then | 87 | if [ "$TAP" = "" ]; then |
88 | if [ -e "$NOSUDO_FLAG" ]; then | ||
89 | echo "Error: There are no available tap devices to use for networking," | ||
90 | echo "and I see $NOSUDO_FLAG exists, so I am not going to try creating" | ||
91 | echo "a new one with sudo." | ||
92 | exit 1 | ||
93 | fi | ||
94 | |||
84 | GROUPID=`id -g` | 95 | GROUPID=`id -g` |
85 | echo 'Setting up tap interface under sudo' | 96 | echo 'Setting up tap interface under sudo' |
86 | tap=`sudo $QEMUIFUP $GROUPID $POKY_NATIVE_SYSROOT` | 97 | tap=`sudo $QEMUIFUP $GROUPID $POKY_NATIVE_SYSROOT` |