commit 853aa710643d2af4b49ad004d9f289294f3e2c0e parent f76d3b852633a5bcca9e13aec131293408a07557 Author: sin <sin@2f30.org> Date: Thu, 5 Sep 2013 10:06:36 +0100 Fix qemu-run to initialize vde properly Diffstat:
M | suckless-img/qemu-run | | | 9 | ++++++++- |
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/suckless-img/qemu-run b/suckless-img/qemu-run @@ -1,3 +1,10 @@ #!/bin/sh -qemu-system-x86_64 -net nic,model=ne2k_pci -kernel bzImage -initrd build/initramfs.img -append "quiet" +vdesock="/tmp/sucklessvde" + +ps -ef | grep vde_switch | grep "sock $vdesock" | grep -v grep > /dev/null || { + vde_switch -sock "$vdesock" -daemon -mod 660 -group kvm && + slirpvde -s "$vdesock" --dhcp --daemon -H '10.1.2.0/24' -L '2223:10.1.2.15:22' +} + +qemu-system-x86_64 -net nic,model=ne2k_pci -net vde,sock="${vdesock}" -kernel bzImage -initrd build/initramfs.img -append "quiet"