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 |
| 15 | modprobe uio_pci_generic |
Dave Wallace | ed0e49c | 2017-01-26 21:42:00 -0500 | [diff] [blame] | 16 | fi |
| 17 | echo "Starting VPP..." |
Marco Varlese | c2e63fe | 2017-10-06 15:07:08 +0200 | [diff] [blame] | 18 | if [ "$OS_ID" == "ubuntu" ] && [ $OS_CODENAME = "trusty" ] ; then |
Dave Wallace | ed0e49c | 2017-01-26 21:42:00 -0500 | [diff] [blame] | 19 | start vpp |
| 20 | else |
Ed Warnicke | d6a0fc5 | 2016-04-12 17:34:48 -0500 | [diff] [blame] | 21 | service vpp start |
| 22 | fi |