From e19d01cd638f54dae64da84ded3a14023cc8838c Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Fri, 18 Jun 2010 16:14:51 +0000 Subject: [PATCH] fix distro detection script for 'SUSE LINUX Enterprise Server 9 (x86_64) 3' which has lsb-release but not with that info git-svn-id: http://www.observium.org/svn/observer/trunk@1208 61d68cd4-352d-0410-923a-c4978735b2b8 --- scripts/distro | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/distro b/scripts/distro index 64aa4fdf0..239ceea3b 100755 --- a/scripts/distro +++ b/scripts/distro @@ -42,8 +42,12 @@ GetVersionFromFile() DIST="${DIST}[`cat /etc/UnitedLinux-release | tr "\n" ' ' | sed s/VERSION.*//`]" fi if [ -f /etc/lsb-release ] ; then - DIST="`cat /etc/lsb-release | grep DISTRIB_ID | cut -d "=" -f2`" - REV="`cat /etc/lsb-release | grep DISTRIB_RELEASE | 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`" + if [ "$LSB_DIST" != "" ] ; then + DIST=$LSB_DIST + REV=$LSB_REV + fi fi # OSSTR="${OS} ${DIST} ${REV}(${PSUEDONAME} ${KERNEL} ${MACH})" OSSTR="${DIST} ${REV}"