Ignore error installing OVS controller, and disable its startup script.
This commit is contained in:
+26
-15
@@ -213,16 +213,19 @@ function wireshark {
|
|||||||
|
|
||||||
# Install Open vSwitch
|
# Install Open vSwitch
|
||||||
# Instructions derived from OVS INSTALL, INSTALL.OpenFlow and README files.
|
# Instructions derived from OVS INSTALL, INSTALL.OpenFlow and README files.
|
||||||
|
|
||||||
function ovs {
|
function ovs {
|
||||||
echo "Installing Open vSwitch..."
|
echo "Installing Open vSwitch..."
|
||||||
|
|
||||||
# Required for module build/dkms install
|
# Required for module build/dkms install
|
||||||
$install $KERNEL_HEADERS
|
$install $KERNEL_HEADERS
|
||||||
|
|
||||||
|
ovspresent=0
|
||||||
|
|
||||||
# First see if we have packages
|
# First see if we have packages
|
||||||
# XXX wget -c seems to fail from github/amazon s3
|
# XXX wget -c seems to fail from github/amazon s3
|
||||||
cd /tmp
|
cd /tmp
|
||||||
if wget $OVS_PACKAGE_LOC/$OVS_PACKAGE_NAME; then
|
if wget $OVS_PACKAGE_LOC/$OVS_PACKAGE_NAME 2> /dev/null; then
|
||||||
$install patch dkms fakeroot python-argparse
|
$install patch dkms fakeroot python-argparse
|
||||||
tar xf $OVS_PACKAGE_NAME
|
tar xf $OVS_PACKAGE_NAME
|
||||||
orig=`tar tf $OVS_PACKAGE_NAME`
|
orig=`tar tf $OVS_PACKAGE_NAME`
|
||||||
@@ -234,21 +237,11 @@ function ovs {
|
|||||||
# Annoyingly, things seem to be missing without this flag
|
# Annoyingly, things seem to be missing without this flag
|
||||||
$pkginst --force-confmiss $pkg
|
$pkginst --force-confmiss $pkg
|
||||||
done
|
done
|
||||||
# Switch can run on its own, but
|
ovspresent=1
|
||||||
# Mininet should control the controller
|
|
||||||
if [ -e /etc/init.d/openvswitch-controller ]; then
|
|
||||||
if sudo service openvswitch-controller stop; then
|
|
||||||
echo "Stopped running controller"
|
|
||||||
fi
|
|
||||||
sudo update-rc.d openvswitch-controller disable
|
|
||||||
fi
|
|
||||||
echo "Done (hopefully) installing packages"
|
|
||||||
cd ~
|
|
||||||
return
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Otherwise try distribution's OVS packages
|
# Otherwise try distribution's OVS packages
|
||||||
if [ "$DIST" = "Ubuntu" ] && [ `echo "$RELEASE >= 11.10" | bc` = 1 ]; then
|
if [ "$DIST" = "Ubuntu" ] && [ `expr $RELEASE '>=' 11.10` = 1 ]; then
|
||||||
if ! dpkg --get-selections | grep openvswitch-datapath; then
|
if ! dpkg --get-selections | grep openvswitch-datapath; then
|
||||||
# If you've already installed a datapath, assume you
|
# If you've already installed a datapath, assume you
|
||||||
# know what you're doing and don't need dkms datapath.
|
# know what you're doing and don't need dkms datapath.
|
||||||
@@ -256,10 +249,28 @@ function ovs {
|
|||||||
$install openvswitch-datapath-dkms
|
$install openvswitch-datapath-dkms
|
||||||
fi
|
fi
|
||||||
if $install openvswitch-switch openvswitch-controller; then
|
if $install openvswitch-switch openvswitch-controller; then
|
||||||
return
|
echo "Ignoring error installing openvswitch-controller"
|
||||||
fi
|
fi
|
||||||
|
ovspresent=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Switch can run on its own, but
|
||||||
|
# Mininet should control the controller
|
||||||
|
if [ -e /etc/init.d/openvswitch-controller ]; then
|
||||||
|
if sudo service openvswitch-controller stop; then
|
||||||
|
echo "Stopped running controller"
|
||||||
|
fi
|
||||||
|
sudo update-rc.d openvswitch-controller disable
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $ovspresent = 1 ]; then
|
||||||
|
echo "Done (hopefully) installing packages"
|
||||||
|
cd ~
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Otherwise attempt to install from source
|
||||||
|
|
||||||
$install pkg-config gcc make python-dev libssl-dev libtool
|
$install pkg-config gcc make python-dev libssl-dev libtool
|
||||||
|
|
||||||
if [ "$DIST" = "Debian" ]; then
|
if [ "$DIST" = "Debian" ]; then
|
||||||
@@ -344,7 +355,7 @@ function nox {
|
|||||||
# Apply patches
|
# Apply patches
|
||||||
git checkout -b tutorial-destiny
|
git checkout -b tutorial-destiny
|
||||||
git am ~/mininet/util/nox-patches/*tutorial-port-nox-destiny*.patch
|
git am ~/mininet/util/nox-patches/*tutorial-port-nox-destiny*.patch
|
||||||
if [ "$DIST" = "Ubuntu" ] && [ `expr $RELEASE '>=' 12.04` -eq 1 ]; then
|
if [ "$DIST" = "Ubuntu" ] && [ `expr $RELEASE '>=' 12.04` = 1 ]; then
|
||||||
git am ~/mininet/util/nox-patches/*nox-ubuntu12-hacks.patch
|
git am ~/mininet/util/nox-patches/*nox-ubuntu12-hacks.patch
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user