From 12095a12f4cc5163ac251de46eed4386f4b73ade Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Tue, 23 Sep 2014 17:49:46 -0700 Subject: [PATCH] Try to install openvswitch-testcontroller if needed --- util/install.sh | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/util/install.sh b/util/install.sh index 0b6e2aa..5092894 100755 --- a/util/install.sh +++ b/util/install.sh @@ -326,17 +326,24 @@ function ovs { $install openvswitch-datapath-dkms fi - $install openvswitch-switch openvswitch-controller + $install openvswitch-switch + 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 + else + echo "Attempting to install openvswitch-testcontroller" + if ! $install openvswitch-testcontroller; then + echo "Failed - giving up" + fi + fi - # 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 } function remove_ovs {