Meta: Don't run qemu as root

This currently only supports Linux but I don't think anyone else
ran this yet because they'd have run into the E1000 bug I fixed
in #6669
This commit is contained in:
Gunnar Beutner 2021-04-27 00:36:23 +02:00 committed by Andreas Kling
parent bf703ee553
commit 6652ce15a4
Notes: sideshowbarker 2024-07-18 19:02:20 +09:00

View File

@ -105,7 +105,8 @@ elif [ "$SERENITY_RUN" = "qn" ]; then
-append "${SERENITY_KERNEL_CMDLINE}"
elif [ "$SERENITY_RUN" = "qtap" ]; then
# Meta/run.sh qtap: qemu with tap
sudo "$SERENITY_QEMU_BIN" \
sudo ip tuntap add dev tap0 mode tap user "$(id -u)"
"$SERENITY_QEMU_BIN" \
$SERENITY_COMMON_QEMU_ARGS \
$SERENITY_VIRT_TECH_ARG \
$SERENITY_PACKET_LOGGING_ARG \
@ -113,6 +114,7 @@ elif [ "$SERENITY_RUN" = "qtap" ]; then
-device e1000,netdev=br0 \
-kernel Kernel/Kernel \
-append "${SERENITY_KERNEL_CMDLINE}"
sudo ip tuntap del dev tap0 mode tap
elif [ "$SERENITY_RUN" = "qgrub" ]; then
# Meta/run.sh qgrub: qemu with grub
"$SERENITY_QEMU_BIN" \