Created
August 17, 2019 07:37
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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