Handle openvswitch-testcontroller in ubuntu 15
This commit is contained in:
+16
-11
@@ -357,23 +357,28 @@ function ovs {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
$install openvswitch-switch
|
$install openvswitch-switch
|
||||||
|
OVSC=""
|
||||||
if $install openvswitch-controller; then
|
if $install openvswitch-controller; then
|
||||||
# Switch can run on its own, but
|
OVSC="openvswitch-controller"
|
||||||
# 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
|
|
||||||
else
|
else
|
||||||
echo "Attempting to install openvswitch-testcontroller"
|
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"
|
echo "Failed - skipping openvswitch-testcontroller"
|
||||||
fi
|
fi
|
||||||
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 {
|
function remove_ovs {
|
||||||
|
|||||||
Reference in New Issue
Block a user