[rancid] Minor patch for 2600/3600 Compression AIM reporting

Terry Kennedy terry at tmk.com
Tue Jul 25 05:12:22 UTC 2006


Hello, all -

  I just placed a 2651XM with a compression AIM into service and noticed a
problem with the reporting of the AIM - it was mixed in with the WIC info:

!Slot 0/0: type FT1 BT8360
!Slot 0/0: hvers 1.3 rev B0
!Slot 0/0: part 800-03279-03, serial xxxxxxxx
!
!Slot 0/1: type FT1 BT8360
!Slot 0/1: hvers 1.0 rev B0
!Slot 0/1: hvers 1.3 rev D0
!Slot 0/1: part 73-3045-04, serial JABxxxxxxxx
!Slot 0/1: part 800-03279-03, serial xxxxxxxx

  I made a trivial patch to add detection for this card, and now have out-
put like this:

!Slot 0/0: type FT1 BT8360
!Slot 0/0: hvers 1.3 rev B0
!Slot 0/0: part 800-03279-03, serial xxxxxxxx
!
!Slot 0/1: type FT1 BT8360
!Slot 0/1: hvers 1.3 rev D0
!Slot 0/1: part 800-03279-03, serial xxxxxxxx
!
!Slot 0: type Compression AIM
!Slot 0: hvers 1.0 rev B0
!Slot 0: part 73-3045-04, serial JABxxxxxxxx

  Here is the patch:

*** rancid.bak	Fri Feb  3 19:10:51 2006
--- rancid	Tue Jul 25 01:04:53 2006
***************
*** 891,897 ****
  	# 7200, 3600, 2600, and 1700 stuff
  	if (/^(Slot)\s+(\d+(\/\d+)?):/
  	    || /^\s+(WIC|VIC|WIC\/VIC) Slot (\d):/
! 	    || /^(Encryption AIM) (\d):/) {
  	    if ($1 eq "WIC") {
  		$WIC = "/$2";
  	    } elsif ($1 eq "VIC") {
--- 891,898 ----
  	# 7200, 3600, 2600, and 1700 stuff
  	if (/^(Slot)\s+(\d+(\/\d+)?):/
  	    || /^\s+(WIC|VIC|WIC\/VIC) Slot (\d):/
! 	    || /^(Encryption AIM) (\d):/
!             || /^(Compression AIM) (\d):/) {
  	    if ($1 eq "WIC") {
  		$WIC = "/$2";
  	    } elsif ($1 eq "VIC") {
***************
*** 901,906 ****
--- 902,913 ----
  	    } elsif ($1 eq "DSP") {
  		$WIC = "/$2";
  	    } elsif ($1 eq "Encryption AIM") {
+ 		$slot = "$2";
+ 		undef($WIC);
+ 		ProcessHistory("SLOT","","","!\n");
+ 		ProcessHistory("SLOT","keysort","B","!Slot $slot: type $1\n");
+ 		next;
+ 	    } elsif ($1 eq "Compression AIM") {
  		$slot = "$2";
  		undef($WIC);
  		ProcessHistory("SLOT","","","!\n");

  However, given that there are at least two other types of AIMs out there
(ATM and VPN), it would probably be better to match on "<anything> AIM", un-
someone thinks there's a reason not to.

        Terry Kennedy             http://www.tmk.com
        terry at tmk.com             New York, NY USA



More information about the Rancid-discuss mailing list