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
This commit is contained in:
Tom Laermans
2010-06-18 16:14:51 +00:00
parent 7d4fc82707
commit e19d01cd63

View File

@ -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}"