From 524b708ef04cc608b00b2417b6b3a477701ed256 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 27 Nov 2007 17:02:20 +0000 Subject: [PATCH] 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 --- xCAT-server-2.0/usr/lib/xcat/plugins/sles.pm | 34 ++++++++++++++------ 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/xCAT-server-2.0/usr/lib/xcat/plugins/sles.pm b/xCAT-server-2.0/usr/lib/xcat/plugins/sles.pm index f69656c0f..739921ce1 100644 --- a/xCAT-server-2.0/usr/lib/xcat/plugins/sles.pm +++ b/xCAT-server-2.0/usr/lib/xcat/plugins/sles.pm @@ -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]}); } } }