From 13baca0fc29f01b010e4be8431e821f6681e0b41 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Wed, 3 Feb 2010 08:47:00 +0000 Subject: [PATCH] use the runxcmd to replace the runcmd for xdcp calling git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5122 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/updatenode.pm | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/updatenode.pm b/xCAT-server/lib/xcat/plugins/updatenode.pm index 1ff877c1d..7c11c4c22 100644 --- a/xCAT-server/lib/xcat/plugins/updatenode.pm +++ b/xCAT-server/lib/xcat/plugins/updatenode.pm @@ -1128,14 +1128,14 @@ sub doAIXcopy # copy all the packages foreach my $pkg (@pkglist) { - my $rcpcmd; + my $rcpargs; my $srcfile; if (($pkg =~ /R:/)) { my ($junk, $pname) = split(/:/, $pkg); # use rpm location - $rcpcmd = "xdcp $snkey $rpm_srcdir/$pname $rpm_srcdir"; + $rcpargs = ["$rpm_srcdir/$pname", "$rpm_srcdir"]; } else { @@ -1151,11 +1151,18 @@ sub doAIXcopy } # use installp loc - $rcpcmd = "xdcp $snkey $instp_srcdir/$pname* $instp_srcdir"; + my @allfiles = glob "$instp_srcdir/$pname*"; + my $sourcefiles = ""; + foreach my $file (@allfiles) { + $sourcefiles .= "$file "; + } + $rcpargs = [$sourcefiles, "$instp_srcdir"]; } - my $output = xCAT::Utils->runcmd("$rcpcmd", -1); + my $output = xCAT::Utils->runxcmd({command => ["xdcp"], + node => [$snkey], arg => $rcpargs}, $subreq, -1, 0); + if ($::RUNCMD_RC != 0) { my $rsp;