Code drop for Xeon Phi (mic) support. add the handling of tar format src to call the copytar command

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16824 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
daniceexi 2013-06-30 03:56:29 +00:00
parent 536bc94da7
commit 1d9e405667

View File

@ -93,6 +93,22 @@ sub process_request {
}
else { $file = $_; }
# handle the copycds for tar file
# if the source file is tar format, call the 'copytar' command to handle it.
# currently it's used for Xeon Phi (mic) support
if (-r $file) {
my @filestat = `file $file`;
if (grep /tar archive/, @filestat) {
# this is a tar file, call the 'copytar' to generate the image
my $newreq = dclone($request);
$newreq->{command}= [ 'copytar' ]; #Note the singular, it's different
$newreq->{arg} = ["-f", $file, "-n", $distname];
$doreq->($newreq, $callback);
return;
}
}
my $mntopts = "-t udf,iso9660"; #Prefer udf formate to iso when media supports both, like MS media
if (-r $file and -b $file) # Block device?
{ $mntopts .= " -o ro"; }