[23164] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r22825 - in trunk/athena/bin/machtype: . debian

daemon@ATHENA.MIT.EDU (tabbott@MIT.EDU)
Sun Apr 6 16:51:45 2008

Date: Sun, 6 Apr 2008 16:51:12 -0400 (EDT)
From: tabbott@MIT.EDU
Message-Id: <200804062051.QAA28865@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: tabbott
Date: 2008-04-06 16:51:12 -0400 (Sun, 06 Apr 2008)
New Revision: 22825

Removed:
   trunk/athena/bin/machtype/debian/patches/
Modified:
   trunk/athena/bin/machtype/debian/changelog
   trunk/athena/bin/machtype/machtype_linux.sh
Log:


Modified: trunk/athena/bin/machtype/debian/changelog
===================================================================
--- trunk/athena/bin/machtype/debian/changelog	2008-04-06 20:50:20 UTC (rev 22824)
+++ trunk/athena/bin/machtype/debian/changelog	2008-04-06 20:51:12 UTC (rev 22825)
@@ -1,3 +1,9 @@
+debathena-machtype (10.0.0-1) unstable; urgency=low
+
+  * Merged quilt patches into mainline Athena tree
+
+ -- Shreevatsa R <vatsa@mit.edu>  Sun,  6 Apr 2008 16:13:25 -0400
+
 debathena-machtype (9.4.0-0debathena6) unstable; urgency=low
 
   * Get disk and memory information from /sys and /proc instead of

Modified: trunk/athena/bin/machtype/machtype_linux.sh
===================================================================
--- trunk/athena/bin/machtype/machtype_linux.sh	2008-04-06 20:50:20 UTC (rev 22824)
+++ trunk/athena/bin/machtype/machtype_linux.sh	2008-04-06 20:51:12 UTC (rev 22825)
@@ -19,7 +19,7 @@
 #  -P     : print out Athena System packs (from /srvd/.rvdinfo)
 #  -S     : Print out the Athena System name
 
-PATH=/bin:/usr/bin:/usr/sbin
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
 
 while getopts cdk:m:rvACELMNPS i; do
 	case "$i" in
@@ -133,27 +133,27 @@
 fi
 
 if [ $display ] ; then
-        /sbin/lspci | awk -F: '/VGA/ {print $3}' | sed -n -e 's/^ //' -e p
+	lspci | awk -F: '/VGA/ {print $3}' | sed -n -e 's/^ //' -e p
 	printed=1
 fi
 
 if [ $rdsk ]; then
-	awk '/^SCSI device/ { print; }
-	     /^hd[a-z]:/ { print; }
-	     /^Floppy/ { for (i=3; i <= NF; i += 3) print $i ": " $(i+2); }' \
-	     /var/log/dmesg
+	for d in /sys/block/[fhs]d*; do
+	    echo $(basename "$d"): \
+		$(xargs -I @ expr @ '*' 8 / 15625 < "$d/size")MB \
+		$(cat "$d/device/model" ||
+		  cat "/proc/ide/$(basename "$d")/model")
+	done 2>/dev/null
 	printed=1
 fi
 
 if [ $memory ] ; then
 	if [ $verbose ]; then
-		awk 'BEGIN { FS="[^0-9]+" }
-		     /^Memory:/ { printf "user=%d, phys=%d (%d M)\n",
-				         $2*1.024, $3*1.024, $3/1000; }' \
-		    /var/log/dmesg
+		awk '/^MemTotal:/ { printf "user=%d, phys=%d (%d M)\n",
+					   $2, $2, $2/1024 }' \
+		    /proc/meminfo
 	else
-		awk 'BEGIN { FS="[^0-9]+" }
-		     /^Memory:/ { printf "%d\n", $3*1.024; }' /var/log/dmesg
+		awk '/^MemTotal:/ { printf "%d\n", $2 }' /proc/meminfo
 	fi
 	printed=1
 fi


home help back first fref pref prev next nref lref last post