From 2361faaf6ca4819b1025a5a3d9b51925b3cbfdb1 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 3 Oct 2012 11:15:26 +0000 Subject: [PATCH] handles multiple syncfiles for an osimage git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13934 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/syncfiles.pm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/syncfiles.pm b/xCAT-server/lib/xcat/plugins/syncfiles.pm index f736cfe3b..ffabfafb1 100644 --- a/xCAT-server/lib/xcat/plugins/syncfiles.pm +++ b/xCAT-server/lib/xcat/plugins/syncfiles.pm @@ -94,12 +94,15 @@ sub syncfiles { xCAT::MsgUtils->message("S", "Cannot find synclist file for the $node"); return 0; } - - # call the xdcp plugin to handle the syncfile operation - my $args = ["-F", "$$synclist{$node}"]; - my $env = ["DSH_RSYNC_FILE=$$synclist{$node}"]; - $subreq->({command=>['xdcp'], node=>[$node], arg=>$args, env=>$env}, $callback); - + # this can be a comma separated list of multiple + # syncfiles + my @sl = split(',',$$synclist{$node}); + foreach my $synclistfile (@sl) { + # call the xdcp plugin to handle the syncfile operation + my $args = ["-F", "$synclistfile"]; + my $env = ["DSH_RSYNC_FILE=$synclistfile"]; + $subreq->({command=>['xdcp'], node=>[$node], arg=>$args, env=>$env}, $callback); + } return 1; }