From 6e8c2b71919735eff5cc13a9f636a52e158aa3e8 Mon Sep 17 00:00:00 2001 From: lissav Date: Fri, 1 Feb 2008 13:03:04 +0000 Subject: [PATCH] Fix building of the node list from $nodes not $noderange git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@370 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT-2.0/xCAT/DSHCLI.pm | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/perl-xCAT-2.0/xCAT/DSHCLI.pm b/perl-xCAT-2.0/xCAT/DSHCLI.pm index 4d89762e5..e6e26d4ae 100644 --- a/perl-xCAT-2.0/xCAT/DSHCLI.pm +++ b/perl-xCAT-2.0/xCAT/DSHCLI.pm @@ -3601,13 +3601,17 @@ sub parse_and_run_dsh $::CALLBACK = $callback; if ($ENV{'XCATROOT'}) { - $::XCATROOT = $ENV{'XCATROOT'}; # setup xcatroot home directory - } elsif (-d '/opt/xcat') { - $::XCATROOT = "/opt/xcat"; - } else { - $::XCATROOT = "/usr"; + $::XCATROOT = $ENV{'XCATROOT'}; # setup xcatroot home directory } - + elsif (-d '/opt/xcat') + { + $::XCATROOT = "/opt/xcat"; + } + else + { + $::XCATROOT = "/usr"; + } + # parse the arguments Getopt::Long::Configure("posix_default"); Getopt::Long::Configure("no_gnu_compat"); @@ -3688,8 +3692,8 @@ sub parse_and_run_dsh # # build list of nodes - - $options{'nodes'} = $noderange; + my @nodelist = @$nodes; + $options{'nodes'} = join(',', @nodelist); # build arguments @@ -3803,10 +3807,13 @@ sub parse_and_run_dcp $::CALLBACK = $callback; if ($ENV{'XCATROOT'}) { - $::XCATROOT = $ENV{'XCATROOT'}; # setup xcatroot home directory - } else { - $::XCATROOT = "/opt/xcat"; + $::XCATROOT = $ENV{'XCATROOT'}; # setup xcatroot home directory } + else + { + $::XCATROOT = "/opt/xcat"; + } + # parse the arguments Getopt::Long::Configure("posix_default"); Getopt::Long::Configure("no_gnu_compat"); @@ -3938,8 +3945,8 @@ sub parse_and_run_dcp # # build list of nodes - - $options{'nodes'} = $noderange; + my @nodelist = @$nodes; + $options{'nodes'} = join(',', @nodelist); # Execute the dcp api my @results = xCAT::DSHCLI->runDcp_api(\%options, 0);