mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 03:12:30 +00:00 
			
		
		
		
	Prefer lzma when available for Genesis compression
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11386 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -278,9 +278,15 @@ sub setdestiny { | ||||
|           $xcatdport = $portent->{value}; | ||||
|       } | ||||
|       if (-r "$tftpdir/xcat/genesis.kernel.$arch") { | ||||
| 	  if (-r "$tftpdir/xcat/genesis.fs.$arch.lzma") { | ||||
|           $bootparms->setNodeAttribs($_,{kernel => "xcat/genesis.kernel.$arch", | ||||
|                                    initrd => "xcat/genesis.fs.$arch.lzma", | ||||
|                                    kcmdline => $kcmdline."xcatd=$master:$xcatdport destiny=$state"}); | ||||
| 	  } else { | ||||
|           $bootparms->setNodeAttribs($_,{kernel => "xcat/genesis.kernel.$arch", | ||||
|                                    initrd => "xcat/genesis.fs.$arch.gz", | ||||
|                                    kcmdline => $kcmdline."xcatd=$master:$xcatdport destiny=$state"}); | ||||
| 	} | ||||
|       } else {  #'legacy' environment | ||||
|       $bootparms->setNodeAttribs($_,{kernel => "xcat/nbk.$arch", | ||||
|                                    initrd => "xcat/nbfs.$arch.gz", | ||||
|   | ||||
| @@ -109,8 +109,13 @@ sub process_request { | ||||
|       system("ssh-keygen -t dsa -f $tempdir/etc/ssh_host_dsa_key -C '' -N ''"); | ||||
|    } | ||||
|    if ($invisibletouch) { | ||||
|        if (-x "/usr/bin/lzma") { #let's reclaim some of that size... | ||||
|        $callback->({data=>["Creating genesis.fs.$arch.lzma in $tftpdir/xcat"]}); | ||||
|        system("cd $tempdir; find . | cpio -o -H newc | lzma -C crc32 -9 > $tftpdir/xcat/genesis.fs.$arch.lzma"); | ||||
|        } else { | ||||
|        $callback->({data=>["Creating genesis.fs.$arch.gz in $tftpdir/xcat"]}); | ||||
|        system("cd $tempdir; find . | cpio -o -H newc | gzip -9 > $tftpdir/xcat/genesis.fs.$arch.gz"); | ||||
| 	} | ||||
|    } else { | ||||
|    	$callback->({data=>["Creating nbfs.$arch.gz in $tftpdir/xcat"]}); | ||||
|        system("cd $tempdir; find . | cpio -o -H newc | gzip -9 > $tftpdir/xcat/nbfs.$arch.gz"); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user