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
This commit is contained in:
lissav 2010-05-14 16:21:42 +00:00
parent 6bb06e1aa1
commit 6ab8d34bc6

View File

@ -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