forked from uncloud/uncloud
find ucloud -name \*.py -exec sed -i "s/ucloud/uncloud/g" {} \;
This commit is contained in:
parent
70c8da544e
commit
7b6c02b3ab
68 changed files with 0 additions and 0 deletions
22
uncloud/network/create-tap.sh
Executable file
22
uncloud/network/create-tap.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "$0 tapid dev"
|
||||
echo "f.g. $0 100 br100"
|
||||
echo "Missing arguments" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tapid=$1; shift
|
||||
bridge=$1; shift
|
||||
vxlan=vxlan${tapid}
|
||||
tap=tap${tapid}
|
||||
|
||||
if ! ip link show $tap > /dev/null 2> /dev/null; then
|
||||
ip tuntap add $tap mode tap user `whoami`
|
||||
ip link set $tap up
|
||||
sleep 0.5s
|
||||
ip link set $tap master $bridge
|
||||
fi
|
||||
|
||||
echo $tap
|
||||
Loading…
Add table
Add a link
Reference in a new issue