Skip to content

Instantly share code, notes, and snippets.

@vtta
Created August 17, 2019 07:37
Show Gist options
  • Save vtta/e729527a282b34b182d1e5e0703aefe6 to your computer and use it in GitHub Desktop.
Save vtta/e729527a282b34b182d1e5e0703aefe6 to your computer and use it in GitHub Desktop.
network set up script for kholia/OSX-KVM, usage: ./qemu-ifup.sh tap0
#!/bin/bash
set -x
switch=br0
if [ -n "$1" ];then
ip tuntap add $1 mode tap
ip link set $1 up promisc on
# ip link set $switch up
sleep 0.5s
ip link set $1 master $switch
exit 0
else
echo "Error: no interface specified"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment