From 063abca24314b70c6b550ef1edf9c494338b9fff Mon Sep 17 00:00:00 2001 From: wuzhy Date: Mon, 1 Mar 2010 04:49:11 +0000 Subject: [PATCH] fix bug 2898857 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5316 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/PPCcli.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/PPCcli.pm b/perl-xCAT/xCAT/PPCcli.pm index f2d65b5dc..bf123ad11 100644 --- a/perl-xCAT/xCAT/PPCcli.pm +++ b/perl-xCAT/xCAT/PPCcli.pm @@ -523,6 +523,7 @@ sub mkvterm { # character preceeded with \000 (blank??) # ########################################## + my $fail_msg = "HSCL"; my $ivm_open = "Virtual terminal is already connected"; my $hmc_open = "\000o\000p\000e\000n\000 \000f\000a\000i\000l\000e\000d"; my $hmc_open2 = @@ -558,7 +559,7 @@ sub mkvterm { # Expect result ########################################## my @result = $ssh->expect( $timeout, - [ "$hmc_open|$hmc_open2|$ivm_open", + [ "$hmc_open|$hmc_open2|$ivm_open|$fail_msg", sub { $failed = 1; } ] @@ -566,7 +567,11 @@ sub mkvterm { if ( $failed ) { $ssh->hard_close(); - return( [RC_ERROR,"Virtual terminal is already connected"] ); + if (grep(/$fail_msg/, @result)) { + return( [RC_ERROR, "mkvterm returns the unsuccessful value, please check your entry and retry the command."] ); + } else { + return( [RC_ERROR,"Virtual terminal is already connected"] ); + } } ##########################################