Update of /cvsroot/fink/experimental/thesin/finkinfo/test
In directory sc8-pr-cvs1:/tmp/cvs-serv22153
Modified Files:
sysinfo.pl
Log Message:
Fix for G3s and uptime fixes
Index: sysinfo.pl
===================================================================
RCS file: /cvsroot/fink/experimental/thesin/finkinfo/test/sysinfo.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- sysinfo.pl 12 Dec 2002 20:06:06 -0000 1.6
+++ sysinfo.pl 12 Dec 2002 20:23:08 -0000 1.7
@@ -53,16 +53,23 @@
$TYPE = "Unknown";
}
+ my $truetype;
+ if ($TYPE = "750") {
+ $truetype = "G3";
+ } else {
+ $truetype = $TYPE;
+ }
+
chomp($NUM=`sysctl hw.ncpu`);
$NUM =~ s/hw.ncpu = //;
if ($NUM eq 1 ) {
- $MODEL = "$ARCH/$TYPE";
+ $MODEL = "$ARCH/$truetype";
} elsif ($NUM eq 2) {
- $MODEL="Dual $ARCH/$TYPE";
+ $MODEL="Dual $ARCH/$truetype";
} elsif ($NUM gt 2) {
- $MODEL="Multi $ARCH/$TYPE";
+ $MODEL="Multi $ARCH/$truetype";
} else {
- $MODEL = "#? $ARCH/$TYPE";
+ $MODEL = "#? $ARCH/$truetype";
}
chomp($CPU = `ioreg -n $ARCH,$TYPE | grep clock-frequency`);
@@ -220,7 +227,9 @@
$UPTIME =~ /.*up (.+),.+[0-9]+ user/;
$DAYS = $1;
if ($DAYS =~ /.?(.+).?days, (.+):(.+)/) {
- $UPTIME = sprintf("%sd, %dh, %dm", $1, $2, $3);
+ $UPTIME = sprintf("%dd, %dh, %dm", $1, $2, $3);
+ } elsif ($DAYS =~ /.?(.+).?days, (.+).?hrs/) {
+ $UPTIME = sprintf("%dd, %dh", $1, $2);
} elsif ($DAYS =~ /.?.?(.+):(.+)/) {
$UPTIME = sprintf("%dh, %dm", $1, $2);
} elsif ($DAYS =~ /.?(.+) mins/) {
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits