If lzma is older than gzip genesis, prefer newer

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16034 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2013-04-22 19:18:53 +00:00
parent 317676b98b
commit fecdc35716

View File

@ -385,13 +385,21 @@ sub setdestiny {
$xcatdport = $port_entry;
}
if (-r "$tftpdir/xcat/genesis.kernel.$arch") {
if (-r "$tftpdir/xcat/genesis.fs.$arch.lzma") {
my $bestsuffix="lzma";
my $othersuffix="gz";
if (-r "$tftpdir/xcat/genesis.fs.$arch.lzma" and -r "$tftpdir/xcat/genesis.fs.$arch.gz") {
if (-C "$tftpdir/xcat/genesis.fs.$arch.lzma" > -C "$tftpdir/xcat/genesis.fs.$arch.gz") { #here, lzma is older for whatever reason
$bestsuffix="gz";
$othersuffix="lzma";
}
}
if (-r "$tftpdir/xcat/genesis.fs.$arch.$bestsuffix") {
$bootparms->setNodeAttribs($_,{kernel => "xcat/genesis.kernel.$arch",
initrd => "xcat/genesis.fs.$arch.lzma",
initrd => "xcat/genesis.fs.$arch.$bestsuffix",
kcmdline => $kcmdline."xcatd=$master:$xcatdport destiny=$state"});
} else {
$bootparms->setNodeAttribs($_,{kernel => "xcat/genesis.kernel.$arch",
initrd => "xcat/genesis.fs.$arch.gz",
initrd => "xcat/genesis.fs.$arch.$othersuffix",
kcmdline => $kcmdline."xcatd=$master:$xcatdport destiny=$state"});
}
} else { #'legacy' environment