blob: 3e87e259442c13afcb8880271e06097fd944ce26 [file] [log] [blame]
Ed Warnicked6a0fc52016-04-12 17:34:48 -05001#!/bin/bash
2
3# Figure out what system we are running on
Dave Wallacebc35f462020-09-18 15:35:01 +00004if [ "$(uname)" <> "Darwin" ] ; then
Marco Varlesec2e63fe2017-10-06 15:07:08 +02005 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
Dave Wallacebc35f462020-09-18 15:35:01 +00009if [ "$OS_ID" == "ubuntu" ] ; then
Marco Varlesec2e63fe2017-10-06 15:07:08 +020010 $OS_CODENAME=$UBUNTU_CODENAME
11fi
12
Dave Wallacebc35f462020-09-18 15:35:01 +000013if [ "$OS_ID" == "centos" ] ; 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