diff options
Diffstat (limited to 'bin/jerancid.in')
-rw-r--r-- | bin/jerancid.in | 13 |
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"); |