2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-20 02:00:24 +00:00

fix issue 352: 2.9.2rspconfig HMC sshcfg=disable could not configure sshcfg to disabled state

This commit is contained in:
ertaozh
2015-11-04 06:02:09 -05:00
parent c1ab39bb9a
commit cdf816044b

View File

@@ -445,6 +445,7 @@ sub sshcfg {
# Determine if SSH is enabled
#####################################
if ( !defined( $mode )) {
my ($keytype, $key_string) = split /\ /, $sshkey;
xCAT::MsgUtils->verbose_message($request, "rspconfig :check sshcfg for user:$logon on node:$server.");
my $result = xCAT::PPCcli::send_cmd( $exp, "cat $auth" );
my $Rc = shift(@$result);
@@ -459,7 +460,8 @@ sub sshcfg {
# Find logon in key file
#################################
foreach ( @$result ) {
if ( /$logon$/ ) {
my ($tmp1, $tmp2) = split /\ /, $_;
if ( "$tmp2" eq "$key_string" ) {
return( [[$server,"enabled",SUCCESS]] );
}
}