Fix to centos vagrant file
[vpp.git] / build-root / vagrant / bootstrap.centos7.sh
1
2 # Standard update + upgrade dance
3 yum check-update
4 yum update -y
5
6 # Install dependencies
7 cd /vpp
8 make install-dep
9
10 # Build rpms
11 sudo -H -u vagrant make bootstrap
12 sudo -H -u vagrant make pkg-rpm
13
14 # Install rpms
15
16 (cd build-root/;sudo rpm -Uvh *.rpm)
17
18 # Disable all ethernet interfaces other than the default route
19 # interface so VPP will use those interfaces.  The VPP auto-blacklist
20 # algorithm prevents the use of any physical interface contained in the
21 # routing table (i.e. "route --inet --inet6") preventing the theft of
22 # the management ethernet interface by VPP from the kernel.
23 for intf in $(ls /sys/class/net) ; do
24     if [ -d /sys/class/net/$intf/device ] && 
25         [ "$(route --inet --inet6 | grep default | grep $intf)" == "" ] ; then
26         ifconfig $intf down
27     fi
28 done
29
30 # Install uio-pci-generic
31 modprobe uio_pci_generic
32
33 # Start vpp
34 service vpp start
35
36 # cat README
37 cat /vagrant/README