X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=extras%2Fvagrant%2Fupdate.sh;h=3fb456b26eb67c43beff9562c372879ecce2932f;hb=e01f6ef9efced0b89df4618a7f5e8894c70bbac7;hp=f4139d74c80c85bd63ba96cc727c24ef691fc521;hpb=48009e4c5732180ecc951ac6359b9b96d38b8dc2;p=vpp.git diff --git a/extras/vagrant/update.sh b/extras/vagrant/update.sh index f4139d74c80..3fb456b26eb 100755 --- a/extras/vagrant/update.sh +++ b/extras/vagrant/update.sh @@ -12,19 +12,13 @@ if [ $HUGEPAGES != 1024 ]; then exit fi -# Figure out what system we are running on -if [ -f /etc/lsb-release ];then - . /etc/lsb-release -elif [ -f /etc/redhat-release ];then - yum install -y redhat-lsb - DISTRIB_ID=`lsb_release -si` - DISTRIB_RELEASE=`lsb_release -sr` - DISTRIB_CODENAME=`lsb_release -sc` - DISTRIB_DESCRIPTION=`lsb_release -sd` +if [ "$(uname)" <> "Darwin" ]; then + 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') fi # Do initial setup for the system -if [ $DISTRIB_ID == "Ubuntu" ]; then +if [ "$OS_ID" == "ubuntu" ]; then export DEBIAN_PRIORITY=critical export DEBIAN_FRONTEND=noninteractive @@ -40,8 +34,13 @@ if [ $DISTRIB_ID == "Ubuntu" ]; then update-alternatives --install /bin/sh sh /bin/bash 100 # Install useful but non-mandatory tools - apt-get install -y emacs x11-utils git-review gdb gdbserver -elif [ $DISTRIB_ID == "CentOS" ]; then + apt-get install -y emacs x11-utils git-review gdb gdbserver xfce4-terminal iperf3 +elif [ "$OS_ID" == "centos" ]; then + if [ "$(echo $DISTRIB_RELEASE | cut -d'.' -f1)" == "7" ]; then + rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + yum groupinstall "X Window system" -y + yum groupinstall xfce -y + fi # Standard update + upgrade dance yum check-update yum update -y