From d6a0fc5ea696763c3cba67dc47d8e7943ae7649b Mon Sep 17 00:00:00 2001 From: Ed Warnicke Date: Tue, 12 Apr 2016 17:34:48 -0500 Subject: Break boostrap.sh into pieces In order to make it easier for folks who have existing Centos or Ubuntu boxes to utilize the same 'Getting started' scripting that is used in Vagrant, as well as enable us to use that scripting in CI, broke up bootstrap.sh into update.sh - Things like apt-get update build.sh - Install any dependencies and build vpp clearinterfaces.sh - Clean off any non-default gateway interfaces. Used by vagrant. run.sh - Start vpp as a service on the box. A user (or CI) just wanting to get going and build on an existing Ubuntu or Centos image (ie, not via vagrant) can simply run build.sh Change-Id: I8f19342f163cad07c6c05def943a5fb8e394b879 Signed-off-by: Ed Warnicke --- build-root/vagrant/run.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 build-root/vagrant/run.sh (limited to 'build-root/vagrant/run.sh') diff --git a/build-root/vagrant/run.sh b/build-root/vagrant/run.sh new file mode 100755 index 00000000..7342f388 --- /dev/null +++ b/build-root/vagrant/run.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Figure out what system we are running on +if [ -f /etc/lsb-release ];then + . /etc/lsb-release +elif [ -f /etc/redhat-release ];then + yum install -y redhat-lsb + DISTRIB_ID=`lsb_release -si` + DISTRIB_RELEASE=`lsb_release -sr` + DISTRIB_CODENAME=`lsb_release -sc` + DISTRIB_DESCRIPTION=`lsb_release -sd` +fi + +if [ $DISTRIB_ID == "Ubuntu" ]; then + start vpp +elif [ $DISTRIB_ID == "CentOS" ]; then + # Install uio-pci-generic + modprobe uio_pci_generic + + # Start vpp + service vpp start +fi -- cgit 1.2.3-korg