diff --git a/mininet/moduledeps.py b/mininet/moduledeps.py index f954e03..6f185a0 100644 --- a/mininet/moduledeps.py +++ b/mininet/moduledeps.py @@ -37,7 +37,7 @@ def moduleDeps( subtract=None, add=None ): info( '*** Removing ' + mod + '\n' ) rmmodOutput = rmmod( mod ) if rmmodOutput: - error( 'Error removing ' + mod + '\n%s' % rmmodOutput ) + error( 'Error removing ' + mod + ': %s\n' % rmmodOutput ) exit( 1 ) if mod in lsmod(): error( 'Failed to remove ' + mod + '; still there!\n' ) @@ -47,9 +47,8 @@ def moduleDeps( subtract=None, add=None ): info( '*** Loading ' + mod + '\n' ) modprobeOutput = modprobe( mod ) if modprobeOutput: - error( 'Error inserting ' + mod + ';\n See INSTALL.\n%s' % - modprobeOutput ) - exit( 1 ) + error( 'Error inserting ' + mod + '- is it installed?\n' + + 'Error was: %s\n' % modprobeOutput ) if mod not in lsmod(): error( 'Failed to insert ' + mod + '\n' ) exit( 1 ) diff --git a/util/install.sh b/util/install.sh index aa98e7d..c5ad00e 100755 --- a/util/install.sh +++ b/util/install.sh @@ -127,7 +127,12 @@ function of { sudo apt-get remove -y avahi-daemon # Disable IPv6. Add to /etc/modprobe.d/blacklist: - sudo sh -c "echo 'blacklist net-pf-10\nblacklist ipv6' >> /etc/modprobe.d/blacklist" + if [ "$DIST" = "Ubuntu" ]; then + BLACKLIST=/etc/modprobe.d/blacklist.conf + else + BLACKLIST=/etc/modprobe.d/blacklist + fi + sudo sh -c "echo 'blacklist net-pf-10\nblacklist ipv6' >> $BLACKLIST" } # Install OpenVSwitch @@ -144,7 +149,7 @@ function ovs { sudo apt-get -y --force-yes -t lenny-backports install autoconf fi - if [ "$DIST" == "Ubuntu" ]; then + if [ "$DIST" = "Ubuntu" ]; then sudo apt-get -y install $KERNEL_HEADERS fi @@ -170,9 +175,9 @@ function nox { #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 + if [ "$DIST" = "Debian" ]; then sudo apt-get -y install libboost1.35-dev - elif [ "$DIST" == "Ubuntu" ]; then + elif [ "$DIST" = "Ubuntu" ]; then sudo apt-get -y install python-dev libboost-dev sudo apt-get -y install libboost-filesystem-dev sudo apt-get -y install libboost-test-dev @@ -187,7 +192,7 @@ function nox { # With later autoconf versions this doesn't quite work: ./boot.sh --apps-core || true - if [ "$DIST" == "Debian" ]; then + if [ "$DIST" = "Debian" ]; then # So use this instead: autoreconf --install --force fi @@ -292,9 +297,6 @@ function all { oftest cbench other - # BL Hack: for some annoying reason, the first depmod doesn't - # seem to take on Ubuntu, so do it once again for good measure! - modprobe echo "Please reboot, then run ./mininet/util/install.sh -c to remove unneeded packages." echo "Enjoy Mininet!" }