5b1ef8e044b2475e762759401749b135a596bb98
[sliver-openvswitch.git] / planetlab / scripts / del_port
1 #!/bin/bash
2
3 function error 
4 {
5         echo $1 >&2
6         exit 1
7 }
8
9 if [ -z "$1" ]; then
10         error "Usage ${0##*/} <port>"
11 fi
12
13 set -e
14 if ovs-vsctl port-to-br "$2" >/dev/null 2>&1; then
15         ovs-vsctl del-port "$2"
16 fi