From 2286ef4b364d31343b59e66925e28d6768a7f0b7 Mon Sep 17 00:00:00 2001 From: Bob Lantz <rlantz@cs.stanford.edu> Date: Fri, 24 Jan 2014 15:42:43 -0800 Subject: [PATCH] Remove GRUB_TERMINAL=serial from /etc/default/grub This is added because we install Ubuntu from a serial console. Fixes #265 --- util/vm/build.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/util/vm/build.py b/util/vm/build.py index 54705440..e973dcf0 100755 --- a/util/vm/build.py +++ b/util/vm/build.py @@ -543,9 +543,10 @@ def interact( vm, tests, pre='', post='', prompt=Prompt ): log( '* Waiting for output' ) vm.expect( prompt ) log( '* Fetching Mininet VM install script' ) + branch = Branch if Branch else 'master' vm.sendline( 'wget ' - 'https://raw.github.com/mininet/mininet/master/util/vm/' - 'install-mininet-vm.sh' ) + 'https://raw.github.com/mininet/mininet/%s/util/vm/' + 'install-mininet-vm.sh' % branch ) vm.expect( prompt ) log( '* Running VM install script' ) installcmd = 'bash install-mininet-vm.sh' @@ -564,6 +565,13 @@ def interact( vm, tests, pre='', post='', prompt=Prompt ): log( '* Mininet version: ', version ) log( '* Testing Mininet' ) runTests( vm, tests=tests, pre=pre, post=post ) + # Ubuntu adds this because we install via a serial console, + # but we want the VM to boot via the VM console. Otherwise + # we get the message 'error: terminal "serial" not found' + log( '* Disabling serial console' ) + vm.sendline( "sudo sed -i -e 's/^GRUB_TERMINAL=serial/#GRUB_TERMINAL=serial/' " + "/etc/default/grub; sudo update-grub" ) + vm.expect( prompt ) log( '* Shutting down' ) vm.sendline( 'sync; sudo shutdown -h now' ) log( '* Waiting for EOF/shutdown' ) -- GitLab