1 # Fix grub-pc on Virtualbox with Ubuntu
2 export DEBIAN_FRONTEND=noninteractive
4 # Standard update + upgrade dance
8 # Fix the silly notion that /bin/sh should point to dash by pointing it to bash
10 sudo update-alternatives --install /bin/sh sh /bin/bash 100
13 sudo -H -u vagrant make install-dep
15 # Install useful but non-mandatory tools
16 apt-get install -y emacs git-review gdb gdbserver
18 sudo -H -u vagrant make bootstrap
19 sudo -H -u vagrant make pkg-deb
20 (cd build-root/;dpkg -i *.deb)
22 # Capture all the interface IPs, in case we need them later
23 ifconfig -a > ~vagrant/ifconfiga
24 chown vagrant:vagrant ~vagrant/ifconfiga
26 # Disable all ethernet interfaces other than the default route
27 # interface so VPP will use those interfaces. The VPP auto-blacklist
28 # algorithm prevents the use of any physical interface contained in the
29 # routing table (i.e. "route --inet --inet6") preventing the theft of
30 # the management ethernet interface by VPP from the kernel.
31 for intf in $(ls /sys/class/net) ; do
32 if [ -d /sys/class/net/$intf/device ] &&
33 [ "$(route --inet --inet6 | grep default | grep $intf)" == "" ] ; then