[rancid] New rancid handler for Telco Systems T5C routers
Christian Hammers
chammers at netcologne.de
Fri Jul 17 09:45:00 UTC 2009
Hello
I've written a rancid handler for a Telco Systems T5CL3-24T¹ router that I would
like to see included in the rancid package.
My script is based on bin/zrancid and differs only in three points:
* there is no "end" at the end of a running config
* one password line looks different
* the last exit command is not echoed
I called the script telcorancid in bin/rancid-fe but feel free to
rename it to something else:
'telco' => 'telcorancid',
bye,
-christian-
¹: http://www.telco.com/int/index/en/products/prod/9 and similar
root at hop:/var/lib/rancid# diff -u bin/zrancid bin/telcorancid
--- bin/zrancid 2008-11-15 12:53:52.000000000 +0100
+++ bin/telcorancid 2009-07-17 11:30:05.000000000 +0200
@@ -40,7 +40,9 @@
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
## POSSIBILITY OF SUCH DAMAGE.
#
-# This version of rancid tries to deal with zebra s/w.
+# This version of rancid tries to deal with Telco Systems T5C.
+# It is based on zrancid but does not look for an "end" at the end of
+# the running config and does not echo the last "exit".
#
# RANCID - Really Awesome New Cisco confIg Differ
#
@@ -56,7 +58,7 @@
$debug = $opt_d;
$file = $opt_f;
$host = $ARGV[0];
-$clean_run = 0;
+$clean_run = 1; # there is usually no echoed "exit" at the end of a session
$found_end = 0;
$timeo = 90; # clogin timeout in seconds
@@ -215,6 +217,10 @@
ProcessHistory("ENABLE","","","!$1 <removed>\n");
next;
}
+ if (/^(password)\s/ && $filter_pwds >= 1) {
+ ProcessHistory("ENABLE","","","!$1 <removed>\n");
+ next;
+ }
if (/^username (\S+)(\s.*)? password ((\d) \S+|\S+)/) {
if ($filter_pwds == 2) {
ProcessHistory("USER","keysort","$1","!username $1$2 password <removed>\n");
@@ -327,7 +333,10 @@
return(1);
}
}
- return(0);
+ # There usually is no "end" at the end of the running config
+ # But let's assume the output was complete
+ $found_end = 1;
+ return(1);
}
# dummy function
--
NETCOLOGNE Gesellschaft für Telekommunikation mbH
Am Coloneum 9 | 50829 Köln
Tel: 0221 2222-8711 | Fax: 0221 2222-78711
www.netcologne.de
Geschäftsführer:
Werner Hanf
Karl-Heinz Zankel
HRG 25580, AG Köln
More information about the Rancid-discuss
mailing list