[rancid] Re: problem with procurve 2900-24g and new firmware version (T13.23

Jon Peatfield J.S.Peatfield at damtp.cam.ac.uk
Wed Dec 17 08:32:27 UTC 2008


On Mon, 15 Dec 2008, Jeroen wrote:

> Burton Windle wrote:
>> Did you make any progress on this? I just spent most of this week
>> getting rancid to play nice with a few Dell switches, and I
>> encountered similar issues.
>>
>>
> Hi Burton,
>
> No, because of time I have left it on the side for the moment...
>
> My fix worked, but then the switches that were not yet running version
> 13 firmware wouldn't work....
>
> John offered a larger patch, but that isn't working either....

I'm incuding a patch which works ok for me with either version 12 or 13 of 
a variety of HP procurve switches.  Patch is against rancid-2.3.2a8 - I've 
not yet checked a9.

The patch causes it to send both the show system-information and show 
system information commands but ignore the errors from the one which fails 
with if there are certain 'errors' (Invalid command etc).

The patch is originally from Richard Golier so he deserves the credit.

  -- Jon
-------------- next part --------------
--- rancid-2.3.2a8/bin/hrancid.in.procurve	2008-02-08 06:28:29.000000000 +0000
+++ rancid-2.3.2a8/bin/hrancid.in	2008-09-24 17:42:33.000000000 +0100
@@ -203,7 +203,7 @@
     return;
 }
 
-# This routine parses "show system-information"
+# This routine parses "show system-information" or "show system information"
 sub ShowSystem {
     print STDERR "    In ShowSystem: $_" if ($debug);
 
@@ -212,7 +212,7 @@
 	last if (/^$prompt/);
 	next if (/^(\s*|\s*$cmd\s*)$/);
 	return(-1) if (/command authorization failed/i);
-	return(-1) if /^(Invalid|Ambiguous) input:/i;
+	return(1) if /^(Invalid|Ambiguous) input:/i;
 
 	if (/memory\s+-\s+total\s+:\s+(\S+)/i) {
 	    my($mem) = $1;
@@ -462,6 +462,7 @@
 	{'show version'			=> 'ShowVersion'},
 	{'show flash'			=> 'ShowFlash'},
 	{'show system-information'	=> 'ShowSystem'},
+	{'show system information'	=> 'ShowSystem'},
 	{'show module'			=> 'ShowModule'},
 	{'show stack'			=> 'ShowStack'},
 	{'write term'			=> 'WriteTerm'}


More information about the Rancid-discuss mailing list