From a8d2d87b72471c19a9459947e439eb0baeed70da Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 4 Jun 2015 14:22:12 -0400 Subject: [PATCH] Confluent does not have the same text when connecting to the console. The rnetboot code is looking for the [ Enter ^c? for help] tag. To support both cases, send a Ctrl-E,c,? to the console to look for [help] so that we know we are in a console session. The Ctrl-E "\005" seems to have issues so also check for just "c?" as an indication that we are in a valid console session to continue --- perl-xCAT/xCAT/LparNetbootExp.pm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/LparNetbootExp.pm b/perl-xCAT/xCAT/LparNetbootExp.pm index a037b956e..1a7e0960b 100755 --- a/perl-xCAT/xCAT/LparNetbootExp.pm +++ b/perl-xCAT/xCAT/LparNetbootExp.pm @@ -2660,14 +2660,27 @@ sub lparnetbootexp #################################### nc_msg($verbose, "Connecting to the $node.\n"); sleep 3; + + # Send Ctrl-E, c and ? to get the help to come out to support + # both confluent and conserver consoles + $rconsole->send("\005c?"); + # for some reason the ctrl-e is not being sent for confluent, just getting c? + $timeout = 10; $rconsole->expect( $timeout, - [ qr/Enter.* for help.*/i => + [ qr/c?/i => sub { $rc = 0; $rconsole->clear_accum(); - nc_msg($verbose, "Connected.\n"); + nc_msg($verbose, "Confluent -> Connected.\n"); + } + ], + [ qr/help.*/i => + sub { + $rc = 0; + $rconsole->clear_accum(); + nc_msg($verbose, "Conserver -> Connected.\n"); } ], [ timeout =>