Fix SSHInteract to manuever IMMv2 login

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12821 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2012-05-19 13:58:10 +00:00
parent 9890213fb5
commit b67a60c422

View File

@ -63,11 +63,15 @@ sub new {
#$self->waitfor("-match" => '/password:/i', -errmode => "return") or die "Unable to reach host ",$self->lastline;
$self->print($password);
my $nextline = $self->getline();
if ($nextline eq "\n") {
chomp($nextline);
while ($nextline =~ /^\s*$/) {
$nextline = $self->get();
chomp($nextline);
}
if ($nextline =~ /^password:/ or $nextline =~ /Permission denied, please try again/) {
die "Incorrect Password";
} elsif ($nextline =~ /$promptex/) {
*$self->{_xcatsshinteract}->{_atprompt}=1;
}
} elsif ($match =~ /$promptex/) {
*$self->{_xcatsshinteract}->{_atprompt}=1;