git://git.onelab.eu
/
sliver-openvswitch.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
cosmetic in usage message
[sliver-openvswitch.git]
/
planetlab
/
scripts
/
create_port
1
#!/bin/bash
2
3
function error
4
{
5
echo $1 >&2
6
exit 1
7
}
8
9
if [ -z "$2" ]; then
10
error "Usage ${0##*/} <bridge> <port>"
11
fi
12
13
set -e
14
if ! ovs-vsctl list-ports "$1" | grep -q "^$2\$"; then
15
ovs-vsctl add-port "$1" "$2" -- set interface "$2" type=tunnel
16
fi
17
ovs-appctl netdev-tunnel/get-port "$2"