From 9aa4203cc3423eb29c7b8aff16bef661c32cf977 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Wed, 1 Jun 2016 01:00:04 -0500 Subject: [PATCH] Use lsb_release in the distro script. Don't overwrite REV unless it is set properly by the lsb_release tool. --- scripts/distro | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/distro b/scripts/distro index 8a2ebd02ef..11fc5d5076 100755 --- a/scripts/distro +++ b/scripts/distro @@ -67,10 +67,12 @@ elif [ "${OS}" = "Linux" ] ; then fi if [ -f /etc/lsb-release -a "${IGNORE_LSB}" != 1 ] ; then - LSB_DIST="`cat /etc/lsb-release | grep DISTRIB_ID | cut -d "=" -f2`" - LSB_REV="`cat /etc/lsb-release | grep DISTRIB_RELEASE | cut -d "=" -f2`" + LSB_DIST=$(lsb_release -si) + LSB_REV=$(lsb_release -sr) if [ "$LSB_DIST" != "" ] ; then DIST=$LSB_DIST + fi + if [ "$LSB_REV" != "" ] ; then REV=$LSB_REV fi fi