From 99b608ef483f4cdf53f3e24310eb1bed0bedbca5 Mon Sep 17 00:00:00 2001 From: Nils Steinger Date: Thu, 24 Sep 2015 01:33:45 +0200 Subject: [PATCH] distro script: Ignore /etc/lsb-release on Arch systems On Arch systems, /etc/lsb-release contains the placeholder version string "rolling". Prevent parsing /etc/lsb-release on Arch systems to the script won't report the distribution "Arch rolling". --- scripts/distro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/distro b/scripts/distro index 752c22e9a9..a60e277b81 100755 --- a/scripts/distro +++ b/scripts/distro @@ -40,11 +40,12 @@ elif [ "${OS}" = "Linux" ] ; then elif [ -f /etc/arch-release ] ; then DIST="Arch Linux" REV="" # Omit version since Arch Linux uses rolling releases + IGNORE_LSB=1 # /etc/lsb-release would overwrite $REV with "rolling" elif [ -f /etc/UnitedLinux-release ] ; then DIST="${DIST}[`cat /etc/UnitedLinux-release | tr "\n" ' ' | sed s/VERSION.*//`]" fi - if [ -f /etc/lsb-release ] ; then + 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`" if [ "$LSB_DIST" != "" ] ; then