#!/bin/sh
+SHELL=${SHELL:-/bin/sh}
ac_aux_dir=scripts
# Make sure we can run config.sub.
DISTNAME=redhat
elif test -f /etc/redhat-release
then
- if test `grep CentOs /etc/redhat-release`
+ if grep -q CentOS /etc/redhat-release
then
- DISTNAME=redhat
- else
DISTNAME=centos
+ else
+ DISTNAME=redhat
fi
elif test -f /etc/gentoo-release
then
else
DISTVER=`cat /etc/debian_version`
fi
+ if test -f /etc/lsb-release ; then
+ . /etc/lsb-release
+ if test "x$DISTRIB_ID" != "x" ; then
+ DISTNAME=$DISTRIB_ID
+ fi
+ if test "x$DISTRIB_RELEASE" != "x" ; then
+ DISTVER=$DISTRIB_RELEASE
+ fi
+ fi
;;
freebsd)
DISTVER=`uname -a |awk '{print $3}'`
fi
if test `cat $f | grep release |\
cut -f 3 -d ' '`x = "Enterprise"x ; then
- DISTVER="Enterprise "`cat $f | grep release |\
- cut -f 6 -d ' '`
+ DISTVER="RHEL "`cat $f | grep release | cut -f 6 -d ' '`
else
DISTVER=`cat /etc/redhat-release | grep release |\
cut -f 5 -d ' '`
esac
-echo "${DISTNAME}-${DISTVER}"
+echo "${DISTNAME}-${DISTVER}" | sed -e 's,/,-,g'