Add support for PPC to the SLES plugin

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@87 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2007-11-27 17:02:20 +00:00
parent d2ca68ea4e
commit 524b708ef0

View File

@ -60,13 +60,18 @@ sub mkinstall {
xCAT::Template->subvars("/usr/share/xcat/install/sles/".$ent->{profile}.".tmpl","/install/autoinst/".$node,$node);
mkpath "/install/postscripts/";
xCAT::Postage->writescript($node,"/install/postscripts/".$node);
if (-r "/install/$os/$arch/1/boot/$arch/loader/linux"
and -r "/install/$os/$arch/1/boot/$arch/loader/initrd") {
if (($arch =~ /x86/ and -r "/install/$os/$arch/1/boot/$arch/loader/linux"
and -r "/install/$os/$arch/1/boot/$arch/loader/initrd") or
($arch =~ /ppc/ and -r "/install/$os/$arch/1/suseboot/inst64")) {
#TODO: driver slipstream, targetted for network.
unless ($doneimgs{"$os|$arch"}) {
mkpath("/tftpboot/xcat/$os/$arch");
copy("/install/$os/$arch/1/boot/$arch/loader/linux","/tftpboot/xcat/$os/$arch/");
copy("/install/$os/$arch/1/boot/$arch/loader/initrd","/tftpboot/xcat/$os/$arch/");
if ($arch =~ /x86/) {
copy("/install/$os/$arch/1/boot/$arch/loader/linux","/tftpboot/xcat/$os/$arch/");
copy("/install/$os/$arch/1/boot/$arch/loader/initrd","/tftpboot/xcat/$os/$arch/");
} elsif ($arch =~ /ppc/) {
copy("/install/$os/$arch/1/suseboot/inst64","/tftpboot/xcat/$os/$arch");
}
$doneimgs{"$os|$arch"}=1;
}
#We have a shot...
@ -99,11 +104,22 @@ sub mkinstall {
}
}
$restab->setNodeAttribs($node,{
kernel=>"xcat/$os/$arch/linux",
initrd=>"xcat/$os/$arch/initrd",
kcmdline=>$kcmdline
});
if ($arch =~ /x86/) {
$restab->setNodeAttribs($node,{
kernel=>"xcat/$os/$arch/linux",
initrd=>"xcat/$os/$arch/initrd",
kcmdline=>$kcmdline
});
} elsif ($arch =~ /ppc/) {
$restab->setNodeAttribs($node,{
kernel=>"xcat/$os/$arch/inst64",
initrd=>"",
kcmdline=>$kcmdline
});
}
} else {
$callback->({error=>["Failed to detect copycd configured install source at /install/$os/$arch"],errorcode=>[1]});
}
}
}