diff --git a/perl-xCAT/xCAT/DSHCLI.pm b/perl-xCAT/xCAT/DSHCLI.pm index f353b668a..9b2fa2f86 100644 --- a/perl-xCAT/xCAT/DSHCLI.pm +++ b/perl-xCAT/xCAT/DSHCLI.pm @@ -3785,9 +3785,9 @@ sub parse_and_run_dsh } - # Rules: if (current userid running command) not eq touserid, - # the current running userid must be root - # + # IF using the xdsh -K -l option then we are setting up the + # --devicetype. xdsh -K -l is not allowed for users. + # This is checked for in the client code. # DSH_REMOTE_PASSWORD env variable must be set to the correct # password for the key update. This was setup in xdsh client # frontend. remoteshell.expect depends on this @@ -3860,7 +3860,7 @@ sub parse_and_run_dsh # # setup ssh keys on the nodes or ib switch # - my $rc = xCAT::Utils->setupSSH(@nodelist); + my $rc = xCAT::Utils->setupSSH($options{'nodes'}); my @results = "return code = $rc"; return (@results); } diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index addbd5691..8c45d016f 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -1110,7 +1110,8 @@ sub setupSSH my ($class, $ref_nodes) = @_; my @nodes = $ref_nodes; my @badnodes = (); - my $n_str = join ',', @nodes; + #my $n_str = join ',', @nodes; + my $n_str = $nodes[0]; my $SSHdir = "/install/postscripts/_ssh"; if (!($ENV{'DSH_REMOTE_PASSWORD'})) { @@ -1282,7 +1283,8 @@ rmdir \"/tmp/$to_userid\""; } # must always check to see if worked, run test - foreach my $n (@nodes) + my @testnodes= split(",", $nodes[0]); + foreach my $n (@testnodes) { my $cmd = "$::REMOTESHELL_EXPECT -t $::REMOTE_SHELL $n "; my @cmdout = `$cmd 2>&1`;