From 6ab8d34bc616a13d38c92d090b1c1fdb82c65d3d Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 14 May 2010 16:21:42 +0000 Subject: [PATCH] add xdsh -e hierarchical support git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6118 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-client/bin/xdsh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xCAT-client/bin/xdsh b/xCAT-client/bin/xdsh index 4a565017f..4f909c0a8 100644 --- a/xCAT-client/bin/xdsh +++ b/xCAT-client/bin/xdsh @@ -183,6 +183,10 @@ if ($ENV{'DCP_PULL'}) { push(@{$cmdref->{env}}, "DCP_PULL=$ENV{'DCP_PULL'}"); } +if ($ENV{'DSHEXECUTE'}) +{ + push(@{$cmdref->{env}}, "DSHEXECUTE=$ENV{'DSHEXECUTE'}"); +} xCAT::Client::submit_request($cmdref, \&xCAT::Client::handle_response); exit $xCAT::Client::EXITCODE; @@ -310,6 +314,12 @@ sub parse_args_xdsh xCAT::DSHCLI->show_dsh_config; exit 0; } + # -if -e flag, execute script have to do special processing for hierarchy + # in the plugin + if ($options{'execute'}) + { + $ENV{'DSHEXECUTE'} = join ' ', @ARGV; # execute script + } # find out who is the current user running xdsh #my $current_userid = getlogin(); # does not work for su