tap_pl: allocation of a tap using vsys
[sliver-openvswitch.git] / planetlab / scripts / del_bridge
1 #!/bin/bash
2
3 function error 
4 {
5         echo $1 >&2
6         exit 1
7 }
8
9 function is_switch_running
10 {
11         ovs-appctl version >/dev/null 2>&1
12 }
13
14 if [ -z "$1" ]; then
15         error "Usage: ${0##*/} <bridge name>" 
16 fi
17
18 # ensure ovs-vswitchd is running
19 if ! is_switch_running; then
20         exit 0;
21 fi
22
23 ovs-vsctl del-br $1 || true
24 ovs-appctl exit