summaryrefslogtreecommitdiffstats
path: root/bin/hrancid.in
diff options
context:
space:
mode:
authorTar Committer <tar@ocjtech.us>2006-08-12 02:59:43 +0000
committerTar Committer <tar@ocjtech.us>2006-08-12 02:59:43 +0000
commita0be206eb419f63eeb436631cc91b3456dff006f (patch)
treec6881dc33ba7c94bb44193930402067bbe4350f5 /bin/hrancid.in
parent1cc9f22072de1d314a67387aac57740fb25c5258 (diff)
downloadrancid-a0be206eb419f63eeb436631cc91b3456dff006f.tar.gz
rancid-a0be206eb419f63eeb436631cc91b3456dff006f.tar.xz
rancid-a0be206eb419f63eeb436631cc91b3456dff006f.zip
Imported from rancid-2.3.2a5.tar.gz.rancid-2.3.2a5
Diffstat (limited to 'bin/hrancid.in')
-rw-r--r--bin/hrancid.in14
1 files changed, 10 insertions, 4 deletions
diff --git a/bin/hrancid.in b/bin/hrancid.in
index 5e54bdc..f26182d 100644
--- a/bin/hrancid.in
+++ b/bin/hrancid.in
@@ -1,8 +1,8 @@
#! @PERLV_PATH@
##
-## $Id: hrancid.in,v 1.23 2005/09/25 17:48:29 heas Exp $
+## $Id: hrancid.in,v 1.25 2006/07/10 21:35:39 heas Exp $
##
-## Copyright (C) 1997-2004 by Terrapin Communications, Inc.
+## Copyright (C) 1997-2006 by Terrapin Communications, Inc.
## All rights reserved.
##
## This software may be freely copied, modified and redistributed
@@ -189,8 +189,14 @@ sub ShowSystem {
return(-1) if (/command authorization failed/i);
return(-1) if /^(Invalid|Ambiguous) input:/i;
- /memory\s+-\s+total\s+:\s+(\S+)/i &&
- ProcessHistory("COMMENTS","keysort","B0",";Memory: $1\n");
+ if (/memory\s+-\s+total\s+:\s+(\S+)/i) {
+ my($mem) = $1;
+ $mem =~ s/,//g;
+ $mem /= (1024 * 1024);
+ ProcessHistory("COMMENTS","keysort","B0",";Memory: " . int($mem) .
+ "M\n");
+ next;
+ }
/serial\s+number\s+:\s+(\S+)/i &&
ProcessHistory("COMMENTS","keysort","A1",";Serial Number: $1\n");
/firmware\s+revision\s+:\s+(\S+)/i &&