Enable SLES plugin to install PPC. This includes extending the sles plugin to match os/arch specific templates and making such a template for ppc64.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@88 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -52,12 +52,25 @@ sub mkinstall { | ||||
|     my $os = $ent->{os}; | ||||
|     my $arch = $ent->{arch}; | ||||
|     my $profile = $ent->{profile}; | ||||
|     unless (-r "/usr/share/xcat/install/sles/".$ent->{profile}.".tmpl") { | ||||
|     unless ( | ||||
|         -r "/usr/share/xcat/install/sles/$profile.tmpl" or | ||||
|         -r "/usr/share/xcat/install/sles/$profile.$arch.tmpl" or | ||||
|         -r "/usr/share/xcat/install/sles/$profile.$os.tmpl" or | ||||
|         -r "/usr/share/xcat/install/sles/$profile.$os.$arch.tmpl" | ||||
|         ) { | ||||
|       $callback->({error=>["No AutoYaST template exists for ".$ent->{profile}],errorcode=>[1]}); | ||||
|       next; | ||||
|     } | ||||
|     #Call the Template class to do substitution to produce a kickstart file in the autoinst dir | ||||
|     xCAT::Template->subvars("/usr/share/xcat/install/sles/".$ent->{profile}.".tmpl","/install/autoinst/".$node,$node); | ||||
|     if (-r "/usr/share/xcat/install/sles/$profile.$os.$arch.tmpl") { | ||||
|         xCAT::Template->subvars("/usr/share/xcat/install/sles/$profile.$os.$arch.tmpl","/install/autoinst/$node",$node); | ||||
|     } elsif (-r "/usr/share/xcat/install/sles/$profile.$arch.tmpl") { | ||||
|         xCAT::Template->subvars("/usr/share/xcat/install/sles/$profile.$arch.tmpl","/install/autoinst/$node",$node); | ||||
|     } elsif (-r "/usr/share/xcat/install/sles/$profile.$os.tmpl") { | ||||
|         xCAT::Template->subvars("/usr/share/xcat/install/sles/$profile.$os.tmpl","/install/autoinst/$node",$node); | ||||
|     } elsif (-r "/usr/share/xcat/install/sles/$profile.tmpl") { | ||||
|         xCAT::Template->subvars("/usr/share/xcat/install/sles/$profile.tmpl","/install/autoinst/$node",$node); | ||||
|     } | ||||
|     mkpath "/install/postscripts/"; | ||||
|     xCAT::Postage->writescript($node,"/install/postscripts/".$node); | ||||
|     if (($arch =~ /x86/ and -r "/install/$os/$arch/1/boot/$arch/loader/linux" | ||||
|   | ||||
| @@ -0,0 +1,86 @@ | ||||
| <?xml version="1.0"?> | ||||
| <!DOCTYPE profile SYSTEM "/usr/share/YaST2/include/autoinstall/profile.dtd"> | ||||
| <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> | ||||
|   <install> | ||||
|     <bootloader> | ||||
|       <write_bootloader config:type="boolean">true</write_bootloader> | ||||
|       <activate config:type="boolean">true</activate> | ||||
|       <kernel_parameters></kernel_parameters> | ||||
|       <lba_support config:type="boolean">false</lba_support> | ||||
|       <linear config:type="boolean">false</linear> | ||||
|       <location>mbr</location> | ||||
|     </bootloader> | ||||
|     <general> | ||||
|       <clock> | ||||
|         <hwclock>GMT</hwclock> | ||||
|         <timezone>#TABLE:site:key=timezone:value#</timezone> | ||||
|       </clock> | ||||
|       <keyboard> | ||||
|         <keymap>english-us</keymap> | ||||
|       </keyboard> | ||||
|       <language>en_US</language> | ||||
|       <mode> | ||||
|         <confirm config:type="boolean">false</confirm> | ||||
|         <forceboot config:type="boolean">false</forceboot> | ||||
|         <interactive_boot config:type="boolean">false</interactive_boot> | ||||
|         <reboot config:type="boolean">true</reboot> | ||||
|       </mode> | ||||
|       <mouse> | ||||
|         <id>non</id> | ||||
|       </mouse> | ||||
|     </general> | ||||
|     <partitioning config:type="list"> | ||||
|       <drive> | ||||
|         <device>/dev/sda</device> | ||||
|         <initialize config:type="boolean">true</initialize> | ||||
|         <use>all</use> | ||||
|       </drive> | ||||
|     </partitioning> | ||||
|     <software> | ||||
|       <patterns config:type="list"> | ||||
|         <pattern>base-64bit</pattern> | ||||
|         <pattern>base</pattern> | ||||
| 	    <pattern>x11</pattern> | ||||
|       </patterns> | ||||
|       <packages config:type="list"> | ||||
|         <package>xntp</package> | ||||
|         <package>rsync</package> | ||||
|       </packages> | ||||
|     </software> | ||||
|   </install> | ||||
|   <configure> | ||||
|     <users config:type="list"> | ||||
|       <user> | ||||
|         <username>root</username> | ||||
|         <user_password>#CRYPT:passwd:key=system,username=root:password#</user_password> | ||||
|         <encrypted config:type="boolean">true</encrypted> | ||||
|         <forename/> | ||||
|         <surname/> | ||||
|       </user> | ||||
|     </users> | ||||
|     <networking> | ||||
|       <dns> | ||||
|         <dhcp_hostname config:type="boolean">true</dhcp_hostname> | ||||
|         <dhcp_resolv config:type="boolean">true</dhcp_resolv> | ||||
|         <domain>local</domain> | ||||
|         <hostname>linux</hostname> | ||||
|       </dns> | ||||
|       <interfaces config:type="list"> | ||||
|         <interface> | ||||
|           <bootproto>dhcp</bootproto> | ||||
|           <device>eth0</device> | ||||
|           <startmode>onboot</startmode> | ||||
|         </interface> | ||||
|       </interfaces> | ||||
|       <routing> | ||||
|         <ip_forward config:type="boolean">false</ip_forward> | ||||
|         <routes config:type="list"/> | ||||
|       </routing> | ||||
|     </networking> | ||||
|     <scripts> | ||||
|    #INCLUDE:../scripts/pre.sles# | ||||
|    #INCLUDE:../scripts/chroot.sles# | ||||
|    #INCLUDE:../scripts/post.sles# | ||||
|     </scripts> | ||||
|   </configure> | ||||
| </profile> | ||||
| @@ -34,43 +34,12 @@ | ||||
|         <device>/dev/sda</device> | ||||
|         <initialize config:type="boolean">true</initialize> | ||||
|         <use>all</use> | ||||
|         <partitions config:type="list"> | ||||
|           <partition> | ||||
|             <filesystem config:type="symbol">ext2</filesystem> | ||||
|             <mount>/boot</mount> | ||||
|             <partition_id config:type="integer">131</partition_id> | ||||
|             <partition_nr config:type="integer">1</partition_nr> | ||||
|             <size>50MB</size> | ||||
|           </partition> | ||||
|           <partition> | ||||
|             <mount>swap</mount> | ||||
|             <partition_nr config:type="integer">2</partition_nr> | ||||
|             <size>auto</size> | ||||
|           </partition> | ||||
|           <partition> | ||||
|             <filesystem config:type="symbol">ext3</filesystem> | ||||
|             <mount>/var</mount> | ||||
|             <partition_id config:type="integer">131</partition_id> | ||||
|             <partition_nr config:type="integer">3</partition_nr> | ||||
|             <size>2GB</size> | ||||
|           </partition> | ||||
|           <partition> | ||||
|             <filesystem config:type="symbol">ext3</filesystem> | ||||
|             <mount>/</mount> | ||||
|             <partition_id config:type="integer">131</partition_id> | ||||
|             <partition_nr config:type="integer">4</partition_nr> | ||||
|             <size>max</size> | ||||
|           </partition> | ||||
|         </partitions> | ||||
|       </drive> | ||||
|     </partitioning> | ||||
|     <software> | ||||
|       <patterns config:type="list"> | ||||
|         <pattern>base</pattern> | ||||
| 	<pattern>base-32bit</pattern> | ||||
| 	<pattern>32bit</pattern> | ||||
| 	<pattern>x11-32bit</pattern> | ||||
| 	<pattern>x11</pattern> | ||||
| 	    <pattern>x11</pattern> | ||||
|       </patterns> | ||||
|       <packages config:type="list"> | ||||
|         <package>xntp</package> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user