Skip to content
Snippets Groups Projects
Commit b9288efc authored by Bob Lantz's avatar Bob Lantz
Browse files

Allow specification of branch to install

parent c90fb34d
No related branches found
No related tags found
No related merge requests found
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
# This script is intended to install Mininet into # This script is intended to install Mininet into
# a brand-new Ubuntu virtual machine, # a brand-new Ubuntu virtual machine,
# to create a fully usable "tutorial" VM. # to create a fully usable "tutorial" VM.
#
# optional argument: Mininet branch to install
set -e set -e
echo `whoami` ALL=NOPASSWD: ALL | sudo tee -a /etc/sudoers > /dev/null echo `whoami` ALL=NOPASSWD: ALL | sudo tee -a /etc/sudoers > /dev/null
sudo sed -i -e 's/Default/#Default/' /etc/sudoers sudo sed -i -e 's/Default/#Default/' /etc/sudoers
...@@ -25,11 +27,16 @@ fi ...@@ -25,11 +27,16 @@ fi
if [ -e /etc/rc.local.backup ]; then if [ -e /etc/rc.local.backup ]; then
sudo mv /etc/rc.local.backup /etc/rc.local sudo mv /etc/rc.local.backup /etc/rc.local
fi fi
# Install Mininet # Fetch Mininet
sudo apt-get -y install git-core openssh-server sudo apt-get -y install git-core openssh-server
git clone git://github.com/mininet/mininet git clone git://github.com/mininet/mininet
cd mininet # Optionally check out branch
cd if [ "$1" != "" ]; then
pushd mininet
git checkout -b $1 $1
popd
fi
# Install Mininet
time mininet/util/install.sh time mininet/util/install.sh
# Finalize VM # Finalize VM
time mininet/util/install.sh -tc time mininet/util/install.sh -tc
...@@ -38,4 +45,3 @@ time mininet/util/install.sh -tc ...@@ -38,4 +45,3 @@ time mininet/util/install.sh -tc
# echo "export NOX_CORE_DIR=~/noxcore/build/src/" >> .bashrc # echo "export NOX_CORE_DIR=~/noxcore/build/src/" >> .bashrc
#fi #fi
echo "Done preparing Mininet VM." echo "Done preparing Mininet VM."
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment