mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 05:12:30 +00:00 
			
		
		
		
	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/branches/2.8@16820 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		@@ -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"; }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user