blob: 61c9261fe2f2752873d53874cd06486ff57bba04 [file] [log] [blame]
Ed Warnicked6a0fc52016-04-12 17:34:48 -05001#!/bin/bash
2
3# Figure out what system we are running on
Marco Varlesec2e63fe2017-10-06 15:07:08 +02004if [ "$(uname)" <> "Darwin" ]; then
5 OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
6 OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
Ed Warnicked6a0fc52016-04-12 17:34:48 -05007fi
8
Marco Varlesec2e63fe2017-10-06 15:07:08 +02009if [ "$OS_ID" == "ubuntu" ]; then
10 $OS_CODENAME=$UBUNTU_CODENAME
11fi
12
13if [ "$OS_ID" == "centos" ] || [ "$OS_ID" == "opensuse" ]; then
Ed Warnicked6a0fc52016-04-12 17:34:48 -050014 # Install uio-pci-generic
Kyle Mesteryacc1fbc2018-08-10 16:32:13 -050015 sudo -E modprobe uio_pci_generic
Dave Wallaceed0e49c2017-01-26 21:42:00 -050016fi
Kyle Mesteryacc1fbc2018-08-10 16:32:13 -050017
Dave Wallaceed0e49c2017-01-26 21:42:00 -050018echo "Starting VPP..."
Kyle Mesteryacc1fbc2018-08-10 16:32:13 -050019if [ "$OS_ID" == "ubuntu" ] && [ "$OS_CODENAME" == "trusty" ] ; then
20 sudo -E start vpp
Dave Wallaceed0e49c2017-01-26 21:42:00 -050021else
Kyle Mesteryacc1fbc2018-08-10 16:32:13 -050022 sudo -E service vpp start
Ed Warnicked6a0fc52016-04-12 17:34:48 -050023fi