Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
executable file 16 lines (11 sloc) 392 Bytes
set -o errexit
set -o pipefail
# This script will remove stale veth* ports from OVS $BRIDGE
if [ "$1" = "all" ]; then
IFs=$(sudo ovs-vsctl show | grep -oP "(?<=[\s\"])veth[^[\s\"]*" | sort -u)
IFs=$(sudo ovs-vsctl show | grep "could not open" | grep -oP "(?<=\s)veth[^\s]*")
for x in ${IFs} ; do echo $x ; sudo ovs-vsctl del-port $BRIDGE $x ; done