From 7d44d61585e16a6913d460461feb924e9f2ef54b Mon Sep 17 00:00:00 2001 From: vallard Date: Wed, 16 Jun 2010 06:47:39 +0000 Subject: [PATCH] made it so that it would recopy to directories git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6476 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/imgport.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/imgport.pm b/xCAT-server/lib/xcat/plugins/imgport.pm index 0a717eff3..2fee6622c 100644 --- a/xCAT-server/lib/xcat/plugins/imgport.pm +++ b/xCAT-server/lib/xcat/plugins/imgport.pm @@ -853,8 +853,11 @@ sub moveExtra { return 0; } } - unless(move("$imgdir/extra/$ff", $dest)){ - $callback->( {error=>["Failed to move $imgdir/extra/$ff to $dest"], errorcode => 1}); + # this could cause some problems. This is one of the reasons we may not want to + # allow copying of directories. + system("cp -a $imgdir/extra/$ff/* $dest"); + if($?){ + $callback->( {error=>["Failed to cp -a $imgdir/extra/$ff/* to $dest"], errorcode => 1}); return 0; }