Created
July 22, 2018 11:15
-
-
Save KITSAlexBrown/cfe97c2cbab015ec158d6c6f6cbf0116 to your computer and use it in GitHub Desktop.
Bring up interface
This file contains hidden or 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/sh | |
| set -x | |
| switch=br0 | |
| if [ -n "$1" ];then | |
| # tunctl -u `whoami` -t $1 (use ip tuntap instead!) | |
| ip tuntap add $1 mode tap user `whoami` | |
| ip link set $1 up | |
| sleep 0.5s | |
| # brctl addif $switch $1 (use ip link instead!) | |
| 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