[rancid] Re: jerancid show version parsing

john heasley heas at shrubbery.net
Fri May 15 20:29:49 UTC 2009


Fri, May 15, 2009 at 10:32:06AM -0400, Mack, David A (Dave):
> From the output above you can see that the parsed output is missing
> slots 0, 11 and 16. We need to capture those slots as well. As a side
> note, the slot uptime is actually useful to us as well. I am not really
> very good with PERL, can someone help with this missing output?
> 

I think that this patch will fix the missing slots.  Please confirm.


Index: jerancid.in
===================================================================
RCS file: /home/rancid/.CVS/rancid/bin/jerancid.in,v
retrieving revision 1.47
diff -d -u -r1.47 jerancid.in
--- jerancid.in	4 Mar 2009 19:11:55 -0000	1.47
+++ jerancid.in	15 May 2009 20:15:53 -0000
@@ -193,7 +193,7 @@
 	}
 	/^(--.*) --+$/ && $slots &&
 		ProcessHistory("COMMENTS","keysort","B2", "! $1\n") && next;
-	if (/^(\d+ +\S+ +(\S+).*) \S+$/ && $slots) {
+	if (/^(\d+\s+\S+\s+(\S+).*) \S+$/ && $slots) {
 	    my($line) = $1;
 	    if ($2 != /--+/) {
 		ProcessHistory("COMMENTS","keysort","B3", "! $line\n");



More information about the Rancid-discuss mailing list