diff --git a/perl-xCAT/xCAT/DSHCLI.pm b/perl-xCAT/xCAT/DSHCLI.pm index 0f6f422c9..3496c1f08 100644 --- a/perl-xCAT/xCAT/DSHCLI.pm +++ b/perl-xCAT/xCAT/DSHCLI.pm @@ -42,6 +42,7 @@ our @dsh_valid_env = ( 'DSH_PATH', 'DSH_SYNTAX', 'DSH_TIMEOUT', 'DSH_REMOTE_PASSWORD', 'DSH_TO_USERID', 'DSH_FROM_USERID', + 'DEVICETYPE', ); select(STDERR); $| = 1; diff --git a/xCAT-client/bin/xdsh b/xCAT-client/bin/xdsh index 3baf6655e..7e28019ed 100644 --- a/xCAT-client/bin/xdsh +++ b/xCAT-client/bin/xdsh @@ -166,6 +166,12 @@ if ($ENV{'DSH_TO_USERID'}) push(@{$cmdref->{env}}, "DSH_TO_USERID=$ENV{'DSH_TO_USERID'}"); } +if ($ENV{'DEVICETYPE'}) +{ + push(@{$cmdref->{env}}, "DEVICETYPE=$ENV{'DEVICETYPE'}"); +} + + xCAT::Client::submit_request($cmdref, \&xCAT::Client::handle_response); exit $xCAT::Client::EXITCODE; diff --git a/xCAT-client/pods/man1/xdsh.1.pod b/xCAT-client/pods/man1/xdsh.1.pod index 61e39c922..00a586e38 100644 --- a/xCAT-client/pods/man1/xdsh.1.pod +++ b/xCAT-client/pods/man1/xdsh.1.pod @@ -9,6 +9,9 @@ B I [B<-B> I] [B<-C> I] [B<--devicetype> I] [B<-Q>] [B<-r> I] [B<-s>] [B<-S> B|B] [B<-t> I] [B<-T>] [B<-v>] [B<-X> I] [B<-z>] I +B I [B<-K>] +B I [B<-K>] [B<-l> I] + B [B<-i> I] I B [B<-h> | B<-V> | B<-q>] @@ -244,15 +247,20 @@ is not specified, a default fanout value of B<64> is used. Displays usage information. =item B<-K>|B<--ssh-setup> +=item B<-K>|B<--ssh-setup> B<-l>|B<--user> I Set up the SSH keys for the specified node list. -Currently, this must be run on the management node (not on a -remote client), because it forces itself into bypass mode. +Currently, this must be run on on a client that has the userid +defined consistent with the userid that will be updated with ssh +keys on the node. +If the -l option is not defined, then the user_id updated on the +node will the same as the current user_id running the command. +If the -l option is used, and the user_id is not the current user_id +running the command then the command must be run as root. + Other device types, such as IB switch, are also supported. The device should be defined as a node and nodetype should be defined as switch before connecting. -Specify the user name from [-l username] option with [-K] option -if the default user name is not "root" when setup SSH keys. =item B<-l>|B<--user> I