summaryrefslogtreecommitdiffstats
path: root/bin/jerancid.in
diff options
context:
space:
mode:
authorunknown <unknown@unknown>2009-09-01 13:24:17 +0000
committerunknown <unknown@unknown>2009-09-01 13:24:17 +0000
commit1e2a739ede68f904c84ea693362fdd4445c4fc16 (patch)
treec812acb3606017e6a4334a0b6ce24f769c73c5eb /bin/jerancid.in
parent09f0f026fd4931b90016d0090778983da01c294a (diff)
downloadrancid-2.3.2a10.tar.gz
rancid-2.3.2a10.tar.xz
rancid-2.3.2a10.zip
Imported from rancid-2.3.2a10.tar.gz.rancid-2.3.2a10
Diffstat (limited to 'bin/jerancid.in')
-rw-r--r--bin/jerancid.in13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/jerancid.in b/bin/jerancid.in
index 69d4697..86e08d8 100644
--- a/bin/jerancid.in
+++ b/bin/jerancid.in
@@ -293,6 +293,19 @@ sub DirSlotN {
# fail if the RP is amid the auto-sync process
return(-1) if (/active\/standby/i && /not sync/);
+ if (/(\S+:\s+)(\d+)(\s+)(\d+)(\s+)(\d+)/) {
+ my($totlen) = length($2) - 1;
+ my($tot) = $2 / (1024 * 1024);
+ my($freelen) = length($4) - 1;
+ my($free) = $4 / (1024 * 1024);
+ my($usedlen) = length($6) - 1;
+ my($used) = $6 / (1024 * 1024);
+ my($fmt) = sprintf("%%-%dsK%s%%-%dsK%s%%-%dsK", $totlen, $3,
+ $freelen, $5, $usedlen);
+
+ ProcessHistory("FLASH","","","!Flash: $1" .
+ sprintf($fmt, $tot, $free, $used));
+ }
ProcessHistory("FLASH","","","!Flash: $_");
}
ProcessHistory("","","","!\n");