[rancid] Force10 S-50

john heasley heas at shrubbery.net
Thu Aug 10 07:29:36 UTC 2006


I worked with a user some time ago to try to fix collection problems with
their Force10 S-50.  Apparently there was a change to the UI from earlier
s/w releases.

Anyway, I do not have a Force10 and that user never replied to tell me
whether this fixed the problem for them.  I'd appreciate if someone could
test this change with an S series, whether or not its collection currently
fails.

tia.

Index: bin/f10rancid.in
===================================================================
RCS file: /home/rancid/.CVS/rancid/bin/f10rancid.in,v
retrieving revision 1.20
diff -d -u -r1.20 f10rancid.in
--- bin/f10rancid.in	28 May 2006 22:28:05 -0000	1.20
+++ bin/f10rancid.in	28 May 2006 22:28:25 -0000
@@ -810,6 +810,7 @@
 # This routine processes a "write term"
 sub WriteTerm {
     print STDERR "    In WriteTerm: $_" if ($debug);
+    my($linecnt) = 0;
 
     while (<INPUT>) {
 	tr/\015//d;
@@ -832,6 +833,7 @@
 	    }
 	    tr/\015//d;
 	}
+	$linecnt++;
 	# some versions have other crap mixed in with the bits in the
 	# block above
 	/^! (Last configuration|NVRAM config last)/ && next;
@@ -1033,6 +1035,14 @@
 	    return(1);
 	}
     }
+
+    # The Force10 S-50 lacks a definitive "end of config" marker.  If we have
+    # seen at least 5 lines of write term o/p, we can be reasonably sure that
+    # we got the config.  
+    if ($linecnt > 5) {
+	$found_end = 1;
+	return(1);
+    }
     return(0);
 }
 



More information about the Rancid-discuss mailing list