Try to make format mostly consistent. No tabs for the moment, although
we could switch to smart tabs (i.e. tab for indent, space for align.)
This commit is contained in:
+30
-24
@@ -49,7 +49,7 @@ function kernel {
|
||||
wget -c $KERNEL_LOC/$KERNEL_HEADERS
|
||||
wget -c $KERNEL_LOC/$KERNEL_IMAGE
|
||||
|
||||
#Install custom linux headers and image:
|
||||
# Install custom linux headers and image:
|
||||
sudo dpkg -i $KERNEL_IMAGE $KERNEL_HEADERS
|
||||
|
||||
# The next two steps are to work around a bug in newer versions of
|
||||
@@ -63,7 +63,9 @@ function kernel {
|
||||
# Ensure /boot/grub/menu.lst boots with initrd image:
|
||||
sudo update-grub
|
||||
|
||||
# The default should be the new kernel. Otherwise, you may need to modify /boot/grub/menu.lst to set the default to the entry corresponding to the kernel you just installed.
|
||||
# The default should be the new kernel. Otherwise, you may need to modify
|
||||
# /boot/grub/menu.lst to set the default to the entry corresponding to the
|
||||
# kernel you just installed.
|
||||
fi
|
||||
|
||||
}
|
||||
@@ -74,7 +76,7 @@ function kernel_clean {
|
||||
# To save disk space, remove previous kernel
|
||||
sudo apt-get -y remove $KERNEL_IMAGE_OLD
|
||||
|
||||
#Also remove downloaded packages:
|
||||
# Also remove downloaded packages:
|
||||
rm -f ~/linux-headers-* ~/linux-image-*
|
||||
}
|
||||
|
||||
@@ -89,10 +91,11 @@ function mn_deps {
|
||||
sudo easy_install --upgrade networkx
|
||||
fi
|
||||
|
||||
#Add sysctl parameters as noted in the INSTALL file to increase kernel limits to support larger setups:
|
||||
# Add sysctl parameters as noted in the INSTALL file to increase kernel
|
||||
# limits to support larger setups:
|
||||
sudo su -c "cat $HOME/mininet/util/sysctl_addon >> /etc/sysctl.conf"
|
||||
|
||||
#Load new sysctl settings:
|
||||
# Load new sysctl settings:
|
||||
sudo sysctl -p
|
||||
|
||||
echo "Installing Mininet core"
|
||||
@@ -111,7 +114,8 @@ function of {
|
||||
echo "Installing OpenFlow and its tools..."
|
||||
|
||||
cd ~/
|
||||
sudo apt-get install -y git-core automake m4 pkg-config libtool make libc6-dev autoconf autotools-dev gcc
|
||||
sudo apt-get install -y git-core automake m4 pkg-config libtool \
|
||||
make libc6-dev autoconf autotools-dev gcc
|
||||
git clone git://openflowswitch.org/openflow.git
|
||||
cd ~/openflow
|
||||
|
||||
@@ -134,7 +138,8 @@ function of {
|
||||
mkdir -p ~/.wireshark
|
||||
cp ~/mininet/util/colorfilters ~/.wireshark
|
||||
|
||||
# Remove avahi-daemon, which may cause unwanted discovery packets to be sent during tests, near link status changes:
|
||||
# Remove avahi-daemon, which may cause unwanted discovery packets to be
|
||||
# sent during tests, near link status changes:
|
||||
sudo apt-get remove -y avahi-daemon
|
||||
|
||||
# Disable IPv6. Add to /etc/modprobe.d/blacklist:
|
||||
@@ -153,8 +158,8 @@ function ovs {
|
||||
|
||||
if [ "$DIST" = "Debian" ]; then
|
||||
sudo aptitude -y install pkg-config gcc make git-core python-dev libssl-dev
|
||||
#Install Autoconf 2.63+ backport from Debian Backports repo:
|
||||
#Instructions from http://backports.org/dokuwiki/doku.php?id=instructions
|
||||
# Install Autoconf 2.63+ backport from Debian Backports repo:
|
||||
# Instructions from http://backports.org/dokuwiki/doku.php?id=instructions
|
||||
sudo su -c "echo 'deb http://www.backports.org/debian lenny-backports main contrib non-free' >> /etc/apt/sources.list"
|
||||
sudo apt-get update
|
||||
sudo apt-get -y --force-yes install debian-backports-keyring
|
||||
@@ -165,7 +170,7 @@ function ovs {
|
||||
sudo apt-get -y install $KERNEL_HEADERS
|
||||
fi
|
||||
|
||||
#Install OVS from release
|
||||
# Install OVS from release
|
||||
cd ~/
|
||||
git clone git://openvswitch.org/openvswitch
|
||||
cd $OVS_DIR
|
||||
@@ -186,8 +191,9 @@ function ovs {
|
||||
function nox {
|
||||
echo "Installing NOX w/tutorial files..."
|
||||
|
||||
#Install NOX deps:
|
||||
sudo apt-get -y install autoconf automake g++ libtool python python-twisted swig libxerces-c2-dev libssl-dev make
|
||||
# Install NOX deps:
|
||||
sudo apt-get -y install autoconf automake g++ libtool python python-twisted \
|
||||
swig libxerces-c2-dev libssl-dev make
|
||||
if [ "$DIST" = "Debian" ]; then
|
||||
sudo apt-get -y install libboost1.35-dev
|
||||
elif [ "$DIST" = "Ubuntu" ]; then
|
||||
@@ -195,10 +201,10 @@ function nox {
|
||||
sudo apt-get -y install libboost-filesystem-dev
|
||||
sudo apt-get -y install libboost-test-dev
|
||||
fi
|
||||
#Install NOX optional deps:
|
||||
# Install NOX optional deps:
|
||||
sudo apt-get install -y libsqlite3-dev python-simplejson
|
||||
|
||||
#Install NOX:
|
||||
# Install NOX:
|
||||
cd ~/
|
||||
git clone git://openflowswitch.org/nox-tutorial noxcore
|
||||
cd noxcore
|
||||
@@ -227,10 +233,10 @@ function nox {
|
||||
function oftest {
|
||||
echo "Installing oftest..."
|
||||
|
||||
#Install deps:
|
||||
# Install deps:
|
||||
sudo apt-get install -y tcpdump python-scapy
|
||||
|
||||
#Install oftest:
|
||||
# Install oftest:
|
||||
cd ~/
|
||||
git clone git://openflow.org/oftest
|
||||
cd oftest
|
||||
@@ -256,25 +262,25 @@ function cbench {
|
||||
function other {
|
||||
echo "Doing other setup tasks..."
|
||||
|
||||
#Enable command auto completion using sudo; modify ~/.bashrc:
|
||||
# Enable command auto completion using sudo; modify ~/.bashrc:
|
||||
sed -i -e 's|# for examples$|&\ncomplete -cf sudo|' ~/.bashrc
|
||||
|
||||
#Install tcpdump and tshark, cmd-line packet dump tools. Also install gitk,
|
||||
#a graphical git history viewer.
|
||||
# Install tcpdump and tshark, cmd-line packet dump tools. Also install gitk,
|
||||
# a graphical git history viewer.
|
||||
sudo apt-get install -y tcpdump tshark gitk
|
||||
|
||||
#Install common text editors
|
||||
# Install common text editors
|
||||
sudo apt-get install -y vim nano emacs
|
||||
|
||||
#Install NTP
|
||||
# Install NTP
|
||||
sudo apt-get install -y ntp
|
||||
|
||||
#Set git to colorize everything.
|
||||
# Set git to colorize everything.
|
||||
git config --global color.diff auto
|
||||
git config --global color.status auto
|
||||
git config --global color.branch auto
|
||||
|
||||
#Reduce boot screen opt-out delay. Modify timeout in /boot/grub/menu.lst to 1:
|
||||
# Reduce boot screen opt-out delay. Modify timeout in /boot/grub/menu.lst to 1:
|
||||
if [ "$DIST" = "Debian" ]; then
|
||||
sudo sed -i -e 's/^timeout.*$/timeout 1/' /boot/grub/menu.lst
|
||||
fi
|
||||
@@ -326,7 +332,7 @@ function vm_clean {
|
||||
history -c # note this won't work if you have multiple bash sessions
|
||||
rm -f ~/.bash_history # need to clear in memory and remove on disk
|
||||
rm -f ~/.ssh/id_rsa* ~/.ssh/known_hosts
|
||||
sudo rm -f ~/.ssh/authorized_keys2
|
||||
sudo rm -f ~/.ssh/authorized_keys*
|
||||
|
||||
# Remove Mininet files
|
||||
#sudo rm -f /lib/modules/python2.5/site-packages/mininet*
|
||||
|
||||
Reference in New Issue
Block a user