mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 09:13:08 +00:00
grant the sounce bin file correct permissions
This commit is contained in:
parent
04e52b3d2a
commit
d8f796ffca
@ -18,6 +18,7 @@ use Getopt::Long;
|
||||
use Expect;
|
||||
use File::Path;
|
||||
use File::Basename;
|
||||
use File::Copy "cp";
|
||||
|
||||
use xCAT::Utils;
|
||||
use xCAT::MsgUtils;
|
||||
@ -183,11 +184,13 @@ sub copydata {
|
||||
|
||||
#check if file exists
|
||||
if ( (-e "$defaultpath/$filename") && ($nooverwrite)){
|
||||
chmod 0755, "$defaultpath/$filename";
|
||||
$callback->({ data => "$defaultpath/$filename is already exists, will not overwrite" });
|
||||
} else {
|
||||
$callback->({ data => "Copying media to $defaultpath" });
|
||||
mkpath ("$defaultpath");
|
||||
system("cp $file $defaultpath");
|
||||
cp "$file", "$defaultpath";
|
||||
chmod 0755, "$defaultpath/$filename";
|
||||
$callback->({ data => "Media copy operation successful" });
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user