|
|
@@ -403,15 +403,18 @@ case "${UNAME}" in
|
|
|
if [ -f /etc/lsb-release ]; then
|
|
|
eval `( . /etc/lsb-release
|
|
|
echo "SC=\"LSB${LSB_VERSION}\""
|
|
|
- if [ ".${DISTRIB_ID}" != . ]; then
|
|
|
+ if [ ".${DISTRIB_ID}" != . -a ".${DISTRIB_RELEASE}" != . ]; then
|
|
|
echo "SP=\"${DISTRIB_ID} ${DISTRIB_RELEASE}\""
|
|
|
fi
|
|
|
) 2>/dev/null`
|
|
|
fi
|
|
|
if [ ".$SP" = . ]; then
|
|
|
- for tagfile in x `cd /etc && \
|
|
|
- /bin/ls *[_-]release *[_-]version 2>/dev/null | grep -v lsb | \
|
|
|
- sed -e '/redhat-release/d'; echo redhat-release`; do
|
|
|
+ for tagfile in x \
|
|
|
+ `cd /etc && \
|
|
|
+ /bin/ls *[_-]release *[_-]version 2>/dev/null | \
|
|
|
+ sed -e '/^redhat-release$/d' -e '/^lsb-release$/d'; \
|
|
|
+ echo redhat-release lsb-release`
|
|
|
+ do
|
|
|
[ ".${tagfile}" = .x ] && continue
|
|
|
[ ! -f "/etc/${tagfile}" ] && continue
|
|
|
n=`echo ${tagfile} | sed -e 's/[_-]release$//' -e 's/[_-]version$//'`
|
|
|
@@ -421,8 +424,16 @@ case "${UNAME}" in
|
|
|
-e 's/^#[^0-9]*\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/' \
|
|
|
-e 's/^#[^0-9]*\([0-9][0-9]*\).*$/\1/' \
|
|
|
-e 's/^#.*$//'`
|
|
|
+ t=""
|
|
|
+ if [ ".${n}" = .redhat ]; then
|
|
|
+ t=`head -1 /etc/${tagfile} | \
|
|
|
+ sed -e 's/^/#/' \
|
|
|
+ -e 's/^#.*Red Hat Enterprise Linux \([AEW]S\).*$/\1/' \
|
|
|
+ -e 's/^#.*$//'`
|
|
|
+ fi
|
|
|
case "`util_lower ${n}`" in
|
|
|
debian ) n="Debian[ GNU/Linux]" ;;
|
|
|
+ fedora ) n="Fedora[ GNU/Linux]" ;;
|
|
|
redhat ) n="RedHat[ Linux]" ;;
|
|
|
suse ) n="SuSE[ Linux]" ;;
|
|
|
mandrake ) n="Mandrake[ Linux]" ;;
|
|
|
@@ -432,6 +443,9 @@ case "${UNAME}" in
|
|
|
unitedlinux ) n="UnitedLinux" ;;
|
|
|
* ) n="${n}[ GNU/Linux]" ;;
|
|
|
esac
|
|
|
+ if [ ".${t}" != . ]; then
|
|
|
+ n="${n} ${t}"
|
|
|
+ fi
|
|
|
SP="$n $v"
|
|
|
break
|
|
|
done
|