summaryrefslogtreecommitdiffstats
path: root/bin/xrancid.in
diff options
context:
space:
mode:
Diffstat (limited to 'bin/xrancid.in')
-rw-r--r--bin/xrancid.in11
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/xrancid.in b/bin/xrancid.in
index 130bf06..fdda169 100644
--- a/bin/xrancid.in
+++ b/bin/xrancid.in
@@ -3,7 +3,7 @@
## $Id$
##
## @PACKAGE@ @VERSION@
-## Copyright (c) 1997-2007 by Terrapin Communications, Inc.
+## Copyright (c) 1997-2008 by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
@@ -402,6 +402,7 @@ sub WriteTerm {
$found_end = 0;
return(-1);
}
+ $found_end = 1;
return(0);
}
@@ -424,8 +425,8 @@ sub DoNothing {print STDOUT;}
@commands = map(keys(%$_), @commandtable);
%commands = map(%$_, @commandtable);
-$cisco_cmds=join(";",@commands);
-$cmds_regexp=join("|",@commands);
+$cisco_cmds = join(";",@commands);
+$cmds_regexp = join("|",@commands);
if (length($host) == 0) {
if ($file) {
@@ -490,13 +491,13 @@ TOP: while(<INPUT>) {
# unreliable about echoing the 'exit\n' command. this match might really
# be a bad idea, but instead rely upon WriteTerm's found_end?
if (/$prompt\s?(quit|exit|Connection( to \S+)? closed)/ && $found_end) {
- $clean_run=1;
+ $clean_run = 1;
last;
}
if (/^Error:/) {
print STDOUT ("$host clogin error: $_");
print STDERR ("$host clogin error: $_") if ($debug);
- $clean_run=0;
+ $clean_run = 0;
last;
}
while (/$prompt\s*($cmds_regexp)\s*$/) {