2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-18 04:10:46 +00:00

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
This commit is contained in:
Victor Hu
2015-06-04 14:22:12 -04:00
parent a4099e121a
commit a8d2d87b72

View File

@ -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 =>