Allow use of /etc/os-release file
[vpp.git] / extras / vagrant / run.sh
1 #!/bin/bash
2
3 # Figure out what system we are running on
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')
7 fi
8
9 if [ "$OS_ID" == "ubuntu" ]; then
10     $OS_CODENAME=$UBUNTU_CODENAME
11 fi
12
13 if [ "$OS_ID" == "centos" ] || [ "$OS_ID" == "opensuse" ]; then
14     # Install uio-pci-generic
15     modprobe uio_pci_generic
16 fi
17 echo "Starting VPP..."
18 if [ "$OS_ID" == "ubuntu" ] && [ $OS_CODENAME = "trusty" ] ; then
19     start vpp
20 else
21     service vpp start
22 fi