2024-01-18 14:51:44 +00:00
|
|
|
#!/usr/bin/env bash
|
2016-04-12 17:34:48 -05:00
|
|
|
|
|
|
|
# Figure out what system we are running on
|
2020-09-18 15:35:01 +00:00
|
|
|
if [ "$(uname)" <> "Darwin" ] ; then
|
2017-10-06 15:07:08 +02:00
|
|
|
OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
|
|
|
|
OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
|
2016-04-12 17:34:48 -05:00
|
|
|
fi
|
|
|
|
|
2020-09-18 15:35:01 +00:00
|
|
|
if [ "$OS_ID" == "ubuntu" ] ; then
|
2017-10-06 15:07:08 +02:00
|
|
|
$OS_CODENAME=$UBUNTU_CODENAME
|
|
|
|
fi
|
|
|
|
|
2020-09-18 15:35:01 +00:00
|
|
|
if [ "$OS_ID" == "centos" ] ; then
|
2016-04-12 17:34:48 -05:00
|
|
|
# Install uio-pci-generic
|
2018-08-10 16:32:13 -05:00
|
|
|
sudo -E modprobe uio_pci_generic
|
2017-01-26 21:42:00 -05:00
|
|
|
fi
|
2018-08-10 16:32:13 -05:00
|
|
|
|
2017-01-26 21:42:00 -05:00
|
|
|
echo "Starting VPP..."
|
2018-08-10 16:32:13 -05:00
|
|
|
if [ "$OS_ID" == "ubuntu" ] && [ "$OS_CODENAME" == "trusty" ] ; then
|
|
|
|
sudo -E start vpp
|
2017-01-26 21:42:00 -05:00
|
|
|
else
|
2018-08-10 16:32:13 -05:00
|
|
|
sudo -E service vpp start
|
2016-04-12 17:34:48 -05:00
|
|
|
fi
|