blob: 3c779fa23f6a3f23c522ad4a99b1cbbd9ed64280 [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
15 modprobe uio_pci_generic
Dave Wallaceed0e49c2017-01-26 21:42:00 -050016fi
17echo "Starting VPP..."
Marco Varlesec2e63fe2017-10-06 15:07:08 +020018if [ "$OS_ID" == "ubuntu" ] && [ $OS_CODENAME = "trusty" ] ; then
Dave Wallaceed0e49c2017-01-26 21:42:00 -050019 start vpp
20else
Ed Warnicked6a0fc52016-04-12 17:34:48 -050021 service vpp start
22fi