*** /usr/local/src/rancid/2.3.3/rancid-2.3.3/bin/rancid.in.ORG Wed Mar 24 00:33:50 2010 --- /usr/local/rancid/bin/rancid_noen Sat Jun 19 08:24:55 2010 *************** *** 1,2 **** ! #! @PERLV_PATH@ ## --- 1,2 ---- ! #! /usr/local/bin/perl ## *************** *** 4,6 **** ## ! ## @PACKAGE@ @VERSION@ ## Copyright (c) 1997-2009 by Terrapin Communications, Inc. --- 4,6 ---- ## ! ## rancid 2.3.3 ## Copyright (c) 1997-2009 by Terrapin Communications, Inc. *************** *** 49,51 **** if ($opt_V) { ! print "@PACKAGE@ @VERSION@\n"; exit(0); --- 49,51 ---- if ($opt_V) { ! print "rancid 2.3.3\n"; exit(0); *************** *** 183,185 **** return(0) if ($found_version); # Only do this routine once ! return(-1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX --- 183,185 ---- return(0) if ($found_version); # Only do this routine once ! return(1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX *************** *** 512,514 **** return(1) if (/(Invalid (input|command) detected|Type help or )/i); ! return(-1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX --- 512,514 ---- return(1) if (/(Invalid (input|command) detected|Type help or )/i); ! return(1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX *************** *** 537,539 **** return(0) if ($found_env); # Only do this routine once ! return(-1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX --- 537,539 ---- return(0) if ($found_env); # Only do this routine once ! return(1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX *************** *** 583,585 **** return(1) if (/(Invalid (input|command) detected|Type help or )/i); ! return(-1) if (/command authorization failed/i); # return(1) if ($type !~ /^12[40]/); --- 583,585 ---- return(1) if (/(Invalid (input|command) detected|Type help or )/i); ! return(1) if (/command authorization failed/i); # return(1) if ($type !~ /^12[40]/); *************** *** 616,618 **** return(1) if (/(Invalid (input|command) detected|Type help or )/i); ! return(-1) if (/command authorization failed/i); # return(1) if ($type !~ /^12[40]/); --- 616,618 ---- return(1) if (/(Invalid (input|command) detected|Type help or )/i); ! return(1) if (/command authorization failed/i); # return(1) if ($type !~ /^12[40]/); *************** *** 661,663 **** return(1) if (/(Open device \S+ failed|Error opening \S+:)/); ! return(-1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX --- 661,663 ---- return(1) if (/(Open device \S+ failed|Error opening \S+:)/); ! return(1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX *************** *** 700,702 **** return(1) if (/(Invalid (input|command) detected|Type help or )/i); ! return(-1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX --- 700,702 ---- return(1) if (/(Invalid (input|command) detected|Type help or )/i); ! return(1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX *************** *** 736,738 **** return(-1) if (/\%Error opening \S+:\S+ \(Device or resource busy\)/i); ! return(-1) if (/command authorization failed/i); return(1) if (/(Open device \S+ failed|Error opening \S+:)/); --- 736,738 ---- return(-1) if (/\%Error opening \S+:\S+ \(Device or resource busy\)/i); ! return(1) if (/command authorization failed/i); return(1) if (/(Open device \S+ failed|Error opening \S+:)/); *************** *** 781,783 **** # return(1) if ($type =~ /^(12[40]|7[05])/); ! return(-1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX --- 781,783 ---- # return(1) if ($type =~ /^(12[40]|7[05])/); ! return(1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX *************** *** 846,848 **** #return(1) if ($type !~ /^7[05]0/); ! return(-1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX --- 846,848 ---- #return(1) if ($type !~ /^7[05]0/); ! return(1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX *************** *** 897,899 **** return(1) if (/(Invalid (input|command) detected|Type help or )/i); ! return(-1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX --- 897,899 ---- return(1) if (/(Invalid (input|command) detected|Type help or )/i); ! return(1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX *************** *** 928,930 **** return(1) if (/(Invalid (input|command) detected|Type help or )/i); ! return(-1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX --- 928,930 ---- return(1) if (/(Invalid (input|command) detected|Type help or )/i); ! return(1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX *************** *** 1023,1025 **** return(0) if ($found_diag); # Only do this routine once ! return(-1) if (/command authorization failed/i); /^$/ && next; --- 1023,1025 ---- return(0) if ($found_diag); # Only do this routine once ! return(1) if (/command authorization failed/i); /^$/ && next; *************** *** 1322,1324 **** return(1) if (/(Invalid (input|command) detected|Type help or )/i); ! return(-1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX --- 1322,1324 ---- return(1) if (/(Invalid (input|command) detected|Type help or )/i); ! return(1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX *************** *** 1362,1364 **** next if (/^(\s*|\s*$cmd\s*)$/); ! return(-1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX --- 1362,1364 ---- next if (/^(\s*|\s*$cmd\s*)$/); ! return(1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX *************** *** 1413,1415 **** return(1) if (/(Invalid (input|command) detected|Type help or )/i); ! return(-1) if (/command authorization failed/i); --- 1413,1415 ---- return(1) if (/(Invalid (input|command) detected|Type help or )/i); ! return(1) if (/command authorization failed/i); *************** *** 1433,1435 **** #return(1) if ($type !~ /^72/); ! return(-1) if (/command authorization failed/i); /^$/ && next; --- 1433,1435 ---- #return(1) if ($type !~ /^72/); ! return(1) if (/command authorization failed/i); /^$/ && next; *************** *** 1484,1486 **** #return(1) if ($type !~ /^(2900XL|3500XL|6000)$/); ! return(-1) if (/command authorization failed/i); next if (/^Configuration last modified by/); --- 1484,1486 ---- #return(1) if ($type !~ /^(2900XL|3500XL|6000)$/); ! return(1) if (/command authorization failed/i); next if (/^Configuration last modified by/); *************** *** 1515,1517 **** return(1) if (/Ambiguous command/i); ! return(-1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX --- 1515,1517 ---- return(1) if (/Ambiguous command/i); ! return(1) if (/command authorization failed/i); # the pager can not be disabled per-session on the PIX *************** *** 1538,1543 **** return(1) if (/Line has invalid autocommand /); ! return(1) if (/(Invalid (input|command) detected|Type help or )/i); return(1) if (/\%Error: No such file or directory/); return(0) if ($found_end); # Only do this routine once ! return(-1) if (/command authorization failed/i); return(-1) if (/% ?configuration buffer full/i); --- 1538,1549 ---- return(1) if (/Line has invalid autocommand /); ! if (/(Invalid (input|command) detected|Type help or )/i) { ! $found_end = 1 ; ! next; ! } ! # next if (/^(\s*|\s*$cmd\s*)$/); ! next if /^\s*\^\s*$/; ! return(1) if (/\%Error: No such file or directory/); return(0) if ($found_end); # Only do this routine once ! return(1) if (/command authorization failed/i); return(-1) if (/% ?configuration buffer full/i); *************** *** 1968,1976 **** } else { ! print STDERR "executing clogin -t $timeo -c\"$cisco_cmds\" $host\n" if ($debug); ! print STDOUT "executing clogin -t $timeo -c\"$cisco_cmds\" $host\n" if ($log); if (defined($ENV{NOPIPE})) { ! system "clogin -t $timeo -c \"$cisco_cmds\" $host $host.raw 2>&1" || die "clogin failed for $host: $!\n"; open(INPUT, "< $host.raw") || die "clogin failed for $host: $!\n"; } else { ! open(INPUT,"clogin -t $timeo -c \"$cisco_cmds\" $host $host.raw 2>&1" || die "clogin failed for $host: $!\n"; open(INPUT, "< $host.raw") || die "clogin failed for $host: $!\n"; } else { ! open(INPUT,"clogin -noenable -t $timeo -c \"$cisco_cmds\" $host ]\s*($cmds_regexp)\s*$/) { $cmd = $1; if (!defined($prompt)) { ! $prompt = ($_ =~ /^([^#>]+[#>])/)[0]; $prompt =~ s/([][}{)(\\])/\\$1/g;