From 92d59e063a2e0956c14f733c7f7517259c8396c4 Mon Sep 17 00:00:00 2001 From: zhaoertao Date: Fri, 27 Apr 2012 07:45:20 +0000 Subject: [PATCH] fix a potential bug for SSHInteract git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12368 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/SSHInteract.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/perl/xCAT/SSHInteract.pm b/xCAT-server/lib/perl/xCAT/SSHInteract.pm index aa3af6369..d673c8fc7 100644 --- a/xCAT-server/lib/perl/xCAT/SSHInteract.pm +++ b/xCAT-server/lib/perl/xCAT/SSHInteract.pm @@ -53,7 +53,7 @@ sub new { if ($nokeycheck) { delete $args{"-nokeycheck"}; } my $self = Net::Telnet->new(%args); _startssh($self,$pty,$username,$host,"-nokeycheck"=>$nokeycheck); - my ($prematch,$match) = $self->waitfor([Match => $args{prompt},'/password:/i',]); + my ($prematch,$match) = $self->waitfor([Match => $args{prompt},'/password:/i',]) or die "Login Failed: ",$self->lastline; if ($match =~ /password:/i) { #$self->waitfor("-match" => '/password:/i', -errmode => "return") or die "Unable to reach host ",$self->lastline; $self->print($password);