Resolve ShellCheck v0.4.7 linting in integration
[releng/builder.git] / packer / provision / mininet.sh
index b9faee4a76a1caaba7d95120e27326d8e34bb56f..b4a31e64e2447bf0f52d9b5bb147663c6a83c651 100644 (file)
@@ -51,52 +51,23 @@ git apply -p0 < ../newOptions.patch
 cd ./util
 ./install.sh -nfv
 
-echo '---> Install CPqD and dependencies'
-apt-get install -y --force-yes build-essential cmake flex
-apt-get install -y --force-yes libpcre++-dev libxerces-c-dev libpcap-dev libboost-all-dev
-
-cd /tmp
-wget -nc http://de.archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_2.5.dfsg-2.1_amd64.deb \
-         http://de.archive.ubuntu.com/ubuntu/pool/main/b/bison/libbison-dev_2.5.dfsg-2.1_amd64.deb
-
-dpkg -i bison_2.5.dfsg-2.1_amd64.deb libbison-dev_2.5.dfsg-2.1_amd64.deb
-rm bison_2.5.dfsg-2.1_amd64.deb libbison-dev_2.5.dfsg-2.1_amd64.deb
-
-wget -nc http://www.nbee.org/download/nbeesrc-jan-10-2013.zip
-unzip nbeesrc-jan-10-2013.zip
-cd nbeesrc-jan-10-2013/src
-cmake .
-make
-cp ../bin/libn*.so /usr/local/lib
-ldconfig
-cp -R ../include/* /usr/include/
-cd ../..
-
-git clone https://github.com/CPqD/ofsoftswitch13.git
-cd ofsoftswitch13
-./boot.sh
-./configure
-make
-make install
-cd ..
-
 echo '---> Installing cbench installation for running openflow performance tests'
-OF_DIR=$HOME/openflow  # Directory that contains OpenFlow code
-OFLOPS_DIR=$HOME/oflops  # Directory that contains oflops repo
+OF_DIR="$HOME/openflow"  # Directory that contains OpenFlow code
+OFLOPS_DIR="$HOME/oflops"  # Directory that contains oflops repo
 
 apt-get install -y --force-yes libsnmp-dev libpcap-dev libconfig-dev
 
-git clone git://gitosis.stanford.edu/openflow.git $OF_DIR
-git clone https://github.com/andi-bigswitch/oflops.git $OFLOPS_DIR
+git clone git://gitosis.stanford.edu/openflow.git "$OF_DIR"
+git clone https://github.com/andi-bigswitch/oflops.git "$OFLOPS_DIR"
 
-cd $OFLOPS_DIR
+cd "$OFLOPS_DIR"
 ./boot.sh
-./configure --with-openflow-src-dir=$OF_DIR
+./configure --with-openflow-src-dir="$OF_DIR"
 make
 make install
 
 echo '---> Installing vlan for vlan based tests in VTN suites'
 apt-get install -y --force-yes vlan
 
-echo '---> All Python package installation should happen in virtualenv'
-apt-get install -y --force-yes python-virtualenv python-pip
+# Install netaddr package which is needed by some custom mininet topologies
+apt-get install -y --force-yes -qq python-netaddr