From 24727f39626d884d93065f200aaf3c6625bec993 Mon Sep 17 00:00:00 2001 From: cxhong Date: Sun, 2 Feb 2020 14:40:24 -0500 Subject: [PATCH] Remove stty command from Expect process --- xCAT-server/lib/xcat/plugins/onie.pm | 1 - xCAT-server/lib/xcat/plugins/pdu.pm | 5 ++--- xCAT-server/share/xcat/scripts/configBNT | 6 ++++-- xCAT-server/share/xcat/scripts/configonie | 1 - 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/onie.pm b/xCAT-server/lib/xcat/plugins/onie.pm index 2fb8921bc..35cae4d6d 100644 --- a/xCAT-server/lib/xcat/plugins/onie.pm +++ b/xCAT-server/lib/xcat/plugins/onie.pm @@ -382,7 +382,6 @@ sub cumulus_connect { $ssh->debug(0); $ssh->log_stdout(0); # suppress stdout output.. - $ssh->slave->stty(qw(sane -echo)); unless ($ssh->spawn($command, @parameters)) { diff --git a/xCAT-server/lib/xcat/plugins/pdu.pm b/xCAT-server/lib/xcat/plugins/pdu.pm index 6b31ab8e3..78a854f7e 100644 --- a/xCAT-server/lib/xcat/plugins/pdu.pm +++ b/xCAT-server/lib/xcat/plugins/pdu.pm @@ -826,7 +826,6 @@ sub session_connect { $ssh->debug(0); $ssh->log_stdout(0); # suppress stdout output.. - $ssh->slave->stty(qw(sane -echo)); unless ($ssh->spawn($command, @parameters)) { @@ -1485,8 +1484,8 @@ sub netcfg_for_irpdu { my $mypdu = new Expect; - $mypdu->log_stdout(1); # suppress stdout output.. - $mypdu->slave->stty(qw(sane -echo)); + $mypdu->debug(0); + $mypdu->log_stdout(0); # suppress stdout output.. unless ($mypdu->spawn($login_cmd)) { diff --git a/xCAT-server/share/xcat/scripts/configBNT b/xCAT-server/share/xcat/scripts/configBNT index 7cc06582a..f7d25ed8f 100755 --- a/xCAT-server/share/xcat/scripts/configBNT +++ b/xCAT-server/share/xcat/scripts/configBNT @@ -409,7 +409,8 @@ sub config_snmp { my $cfg_access3="snmp-server access 5 security usm\r"; my $cfg_access4="snmp-server access 5 read-view iso\r"; - $mysw->slave->stty(qw(sane -echo)); + $mysw->debug(0); + $mysw->log_stdout(0); # suppress stdout output.. unless ($mysw->spawn($login_cmd)) { @@ -522,7 +523,8 @@ sub config_G8264 { my $main_prompt="Main#"; my $authpw_cmd = "/cfg/sys/ssnmp/snmpv3/usm 5/authpw\r"; - $mysw->slave->stty(qw(sane -echo)); + $mysw->debug(0); + $mysw->log_stdout(0); # suppress stdout output.. unless ($mysw->spawn($login_cmd)) { diff --git a/xCAT-server/share/xcat/scripts/configonie b/xCAT-server/share/xcat/scripts/configonie index debbf89b6..021fef056 100755 --- a/xCAT-server/share/xcat/scripts/configonie +++ b/xCAT-server/share/xcat/scripts/configonie @@ -226,7 +226,6 @@ sub cumulus_connect { $ssh->debug(0); $ssh->log_stdout(0); # suppress stdout output.. - $ssh->slave->stty(qw(sane -echo)); unless ($ssh->spawn($command, @parameters)) {