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 |
Marco Varlese | c2e63fe | 2017-10-06 15:07:08 +0200 | [diff] [blame] | 4 | if [ "$(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 Warnicke | d6a0fc5 | 2016-04-12 17:34:48 -0500 | [diff] [blame] | 7 | fi |
| 8 | |
Marco Varlese | c2e63fe | 2017-10-06 15:07:08 +0200 | [diff] [blame] | 9 | if [ "$OS_ID" == "ubuntu" ]; then |
| 10 | $OS_CODENAME=$UBUNTU_CODENAME |
| 11 | fi |
| 12 | |
| 13 | if [ "$OS_ID" == "centos" ] || [ "$OS_ID" == "opensuse" ]; 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 |