diff options
Diffstat (limited to 'bin/arancid.in')
-rw-r--r-- | bin/arancid.in | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/bin/arancid.in b/bin/arancid.in index f51a6c3..a2bf1ef 100644 --- a/bin/arancid.in +++ b/bin/arancid.in @@ -1,23 +1,26 @@ -#!@PERLV_PATH@ +#! @PERLV_PATH@ +## +## $Id: arancid.in,v 1.14 2004/01/11 03:49:13 heas Exp $ ## ## Hacked version of rancid for Alteon WebOS switches ## tested with: ad3 v8.1.18 ## afort@choqolat.org (andrew fort) ## -## -## Copyright (C) 1997-2001 by Henry Kilmer. +## Copyright (C) 1997-2004 by Terrapin Communications, Inc. ## All rights reserved. ## -## This software may be freely copied, modified and redistributed without -## fee for non-commerical purposes provided that this copyright notice is -## preserved intact on all copies and modified copies. +## This software may be freely copied, modified and redistributed +## without fee for non-commerical purposes provided that this license +## remains intact and unmodified with any RANCID distribution. ## ## There is no warranty or other guarantee of fitness of this software. -## It is provided solely "as is". The author(s) disclaim(s) all +## It is provided solely "as is". The author(s) disclaim(s) all ## responsibility and liability with respect to this software's usage ## or its effect upon hardware, computer systems, other software, or ## anything else. ## +## Except where noted otherwise, rancid was written by and is maintained by +## Henry Kilmer, John Heasley, Andrew Partan, Pete Whiting, and Austin Schutz. ## # # RANCID - Really Awesome New Cisco confIg Differ @@ -27,7 +30,7 @@ # usage: arancid [-d] [-l] [-f filename | $host] # use Getopt::Std; -getopts('dflm'); +getopts('dfl'); $log = $opt_l; $debug = $opt_d; $file = $opt_f; @@ -240,7 +243,11 @@ TOP: while(<INPUT>) { while (/>>.*$prompt\s*($cmds_regexp)\s*$/) { $cmd = $1; - if (!defined($prompt)) {$prompt = ($_ =~ /^([^#]+#)/)[0]; } + if (!defined($prompt)) { + $prompt = ($_ =~ /^([^#]+#)/)[0]; + $prompt =~ s/([][}{)(\\])/\\$1/g; + print STDERR ("PROMPT MATCH: $prompt\n") if ($debug); + } print STDERR ("HIT COMMAND:$_") if ($debug); if (!defined($commands{$cmd})) { print STDERR "$host: found unexpected command - \"$cmd\"\n"; |