From 1e2a739ede68f904c84ea693362fdd4445c4fc16 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Sep 2009 13:24:17 +0000 Subject: Imported from rancid-2.3.2a10.tar.gz. --- bin/jerancid.in | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bin/jerancid.in') 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"); -- cgit