Handle openvswitch-testcontroller in ubuntu 15

This commit is contained in:
Bob Lantz
2016-01-12 01:00:34 -08:00
parent 65000d3245
commit 0f5e05c088
+16 -11
View File
@@ -357,23 +357,28 @@ function ovs {
fi
$install openvswitch-switch
OVSC=""
if $install openvswitch-controller; then
# Switch can run on its own, but
# Mininet should control the controller
# This appears to only be an issue on Ubuntu/Debian
if sudo service openvswitch-controller stop; then
echo "Stopped running controller"
fi
if [ -e /etc/init.d/openvswitch-controller ]; then
sudo update-rc.d openvswitch-controller disable
fi
OVSC="openvswitch-controller"
else
echo "Attempting to install openvswitch-testcontroller"
if ! $install openvswitch-testcontroller; then
if $install openvswitch-testcontroller; then
OVSC="openvswitch-testcontroller"
else
echo "Failed - skipping openvswitch-testcontroller"
fi
fi
if [ "$OVSC" ]; then
# Switch can run on its own, but
# Mininet should control the controller
# This appears to only be an issue on Ubuntu/Debian
if sudo service $OVSC stop; then
echo "Stopped running controller"
fi
if [ -e /etc/init.d/$OVSC ]; then
sudo update-rc.d $OVSC disable
fi
fi
}
function remove_ovs {