distro script: Only parse /etc/lsb-release if no known distribution is found

This commit is contained in:
Nils Steinger
2015-09-23 00:06:41 +02:00
parent 774312d457
commit d048e5e616

View File

@@ -45,9 +45,7 @@ elif [ "${OS}" = "Linux" ] ; then
REV="" # Omit version since Arch Linux uses rolling releases REV="" # Omit version since Arch Linux uses rolling releases
elif [ -f /etc/UnitedLinux-release ] ; then elif [ -f /etc/UnitedLinux-release ] ; then
DIST="${DIST}[`cat /etc/UnitedLinux-release | tr "\n" ' ' | sed s/VERSION.*//`]" DIST="${DIST}[`cat /etc/UnitedLinux-release | tr "\n" ' ' | sed s/VERSION.*//`]"
fi elif [ -f /etc/lsb-release ] ; then
if [ -f /etc/lsb-release ] ; then
LSB_DIST="`cat /etc/lsb-release | grep DISTRIB_ID | cut -d "=" -f2`" 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_REV="`cat /etc/lsb-release | grep DISTRIB_RELEASE | cut -d "=" -f2`"
if [ "$LSB_DIST" != "" ] ; then if [ "$LSB_DIST" != "" ] ; then