OSSP CVS Repository

ossp - Difference in ossp-pkg/platform/platform.sh versions 1.18 and 1.19
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/platform/platform.sh 1.18 -> 1.19

--- platform.sh  2003/10/31 20:43:57     1.18
+++ platform.sh  2003/12/11 20:43:41     1.19
@@ -403,15 +403,18 @@
         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 && \
+            for tagfile in x \
+                `cd /etc && \
                 /bin/ls *[_-]release *[_-]version 2>/dev/null | \
-                sed -e '/redhat-release/d'; echo redhat-release`; do
+                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 @@
                        -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 @@
                     unitedlinux ) n="UnitedLinux"        ;;
                     *           ) n="${n}[ GNU/Linux]"   ;;
                 esac
+                if [ ".${t}" != . ]; then
+                    n="${n} ${t}"
+                fi
                 SP="$n $v"
                 break
             done

CVSTrac 2.0.1