OSSP CVS Repository

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

ossp-pkg/platform/platform.sh 1.16 -> 1.17

--- platform.sh  2003/10/31 20:01:18     1.16
+++ platform.sh  2003/10/31 20:27:48     1.17
@@ -576,12 +576,27 @@
 
     #   IBM AIX
     *:AIX:* )
-        AT="${UNAME_MACHINE}"
+        cpu_arch=rs6000
+        if [ -x /usr/sbin/lsdev -a -x /usr/sbin/lsattr ]; then
+            cpu_id=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+            if [ ".`/usr/sbin/lsattr -El ${cpu_id} | grep -i powerpc`" != . ]; then
+                cpu_arch=powerpc
+            fi
+        fi
+        if [ -x /usr/bin/oslevel ]; then
+            os_level=`/usr/bin/oslevel`
+        else
+            os_level="`uname -r`.`uname -v`"
+        fi
+        os_level=`echo "${os_level}" |\
+                  sed -e 's;^\([0-9][0-9]*\.[0-9][0-9]*\)\(\.[0-9][0-9]*\)\(.*\)$;<\1>\2[\3];' \
+                      -e 's;^\([0-9][0-9]*\.[0-9][0-9]*\)\(.*\)$;<\1>\2;'`
+        AT="${cpu_arch}"
         AP="${AT}"
         AC="${AP}"
-        ST="[IBM ]AIX ${UNAME_RELEASE}"
+        ST="[IBM ]AIX ${os_level}"
         SP="${ST}"
-        case "${UNAME_RELEASE}" in
+        case "${os_level}" in
             [12]* ) SC="SVR2" ;;
             *     ) SC="SVR4" ;;
         esac

CVSTrac 2.0.1