X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=extras%2Fvagrant%2Fupdate.sh;h=3fb456b26eb67c43beff9562c372879ecce2932f;hb=bc764c8bc;hp=b630449271e224b9d39f0200a84e6dbcb648898e;hpb=3079a64e19e997e6735b633377285bb5718f4067;p=vpp.git diff --git a/extras/vagrant/update.sh b/extras/vagrant/update.sh index b630449271e..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 @@ -41,7 +35,12 @@ if [ $DISTRIB_ID == "Ubuntu" ]; then # Install useful but non-mandatory tools apt-get install -y emacs x11-utils git-review gdb gdbserver xfce4-terminal iperf3 -elif [ $DISTRIB_ID == "CentOS" ]; then +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