Ed Warnicke | d6a0fc5 | 2016-04-12 17:34:48 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Figure out what system we are running on |
Dave Wallace | bc35f46 | 2020-09-18 15:35:01 +0000 | [diff] [blame] | 4 | if [ "$(uname)" <> "Darwin" ] ; then |
Marco Varlese | c2e63fe | 2017-10-06 15:07:08 +0200 | [diff] [blame] | 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 Warnicke | d6a0fc5 | 2016-04-12 17:34:48 -0500 | [diff] [blame] | 7 | fi |
| 8 | |
Dave Wallace | bc35f46 | 2020-09-18 15:35:01 +0000 | [diff] [blame] | 9 | if [ "$OS_ID" == "ubuntu" ] ; then |
Marco Varlese | c2e63fe | 2017-10-06 15:07:08 +0200 | [diff] [blame] | 10 | $OS_CODENAME=$UBUNTU_CODENAME |
| 11 | fi |
| 12 | |
Dave Wallace | bc35f46 | 2020-09-18 15:35:01 +0000 | [diff] [blame] | 13 | if [ "$OS_ID" == "centos" ] ; then |
Ed Warnicke | d6a0fc5 | 2016-04-12 17:34:48 -0500 | [diff] [blame] | 14 | # Install uio-pci-generic |
Kyle Mestery | acc1fbc | 2018-08-10 16:32:13 -0500 | [diff] [blame] | 15 | sudo -E modprobe uio_pci_generic |
Dave Wallace | ed0e49c | 2017-01-26 21:42:00 -0500 | [diff] [blame] | 16 | fi |
Kyle Mestery | acc1fbc | 2018-08-10 16:32:13 -0500 | [diff] [blame] | 17 | |
Dave Wallace | ed0e49c | 2017-01-26 21:42:00 -0500 | [diff] [blame] | 18 | echo "Starting VPP..." |
Kyle Mestery | acc1fbc | 2018-08-10 16:32:13 -0500 | [diff] [blame] | 19 | if [ "$OS_ID" == "ubuntu" ] && [ "$OS_CODENAME" == "trusty" ] ; then |
| 20 | sudo -E start vpp |
Dave Wallace | ed0e49c | 2017-01-26 21:42:00 -0500 | [diff] [blame] | 21 | else |
Kyle Mestery | acc1fbc | 2018-08-10 16:32:13 -0500 | [diff] [blame] | 22 | sudo -E service vpp start |
Ed Warnicke | d6a0fc5 | 2016-04-12 17:34:48 -0500 | [diff] [blame] | 23 | fi |