13 lines
207 B
Bash
13 lines
207 B
Bash
#!/bin/sh
|
|
set -x
|
|
|
|
if [ -n "$1" ]; then
|
|
ip tuntap add $1 mode tap user $(whoami)
|
|
ip link set $1 up
|
|
ip link set $1 master br0
|
|
exit 0
|
|
else
|
|
echo "Error: no interface specified"
|
|
exit 1
|
|
fi
|