summaryrefslogtreecommitdiffstats
path: root/kickstart.xsl
diff options
context:
space:
mode:
authorNathan Straz <nstraz@redhat.com>2009-02-02 18:36:40 -0500
committerNathan Straz <nstraz@redhat.com>2009-02-02 18:36:40 -0500
commit7e1247b426ae86d7c660a9ca87f76d43773670f6 (patch)
treeb91f593102a185a998bec50255e52ef0022de948 /kickstart.xsl
downloadsteeltoe-7e1247b426ae86d7c660a9ca87f76d43773670f6.tar.gz
steeltoe-7e1247b426ae86d7c660a9ca87f76d43773670f6.tar.xz
steeltoe-7e1247b426ae86d7c660a9ca87f76d43773670f6.zip
Import a sanitized version of Steel Toe, the provisioning system.
Diffstat (limited to 'kickstart.xsl')
-rw-r--r--kickstart.xsl84
1 files changed, 84 insertions, 0 deletions
diff --git a/kickstart.xsl b/kickstart.xsl
new file mode 100644
index 0000000..e0a752b
--- /dev/null
+++ b/kickstart.xsl
@@ -0,0 +1,84 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:exsl="http://exslt.org/common"
+ version="1.0">
+ <xsl:param name="hostname"/>
+ <xsl:param name="treename"/>
+ <xsl:param name="method" select="'http'"/>
+ <xsl:param name="virtinstall"/>
+ <xsl:variable name="host" select="//host[@name=$hostname]"/>
+ <xsl:variable name="dist" select="//tree[@name=$treename and meta/arch=$host/arch]"/>
+ <xsl:include href="select-ks.xsl"/>
+ <xsl:output method="text"/>
+ <xsl:template match="/" xml:space="preserve">
+# Kickstart file generated by Steel Toe
+
+install
+<xsl:choose>
+<xsl:when test="$method='http'">url --url http://<xsl:value-of select="/steeltoe/config/treeserver"/><xsl:value-of select="$dist/path"/></xsl:when>
+<xsl:when test="$method='ftp'">url --url ftp://<xsl:value-of select="/steeltoe/config/treeserver"/><xsl:value-of select="$dist/path"/></xsl:when>
+<xsl:when test="$method='nfs'">nfs --server <xsl:value-of select="/steeltoe/config/treeserver"/> --dir <xsl:value-of select="$dist/path"/></xsl:when>
+</xsl:choose>
+lang en_US.UTF-8
+langsupport --default=en_US.UTF-8 en_US.UTF-8
+# custom devices here
+<xsl:for-each select="$ks/device[@type='scsi']">
+device scsi <xsl:value-of select="."/>
+</xsl:for-each>
+keyboard us
+mouse none
+cmdline
+skipx
+network --device <xsl:value-of select="$ks/ksdevice"/> --bootproto dhcp --hostname <xsl:value-of select="$hostname"/>
+rootpw root
+firewall --disabled
+<xsl:if test="$dist/meta/family != 'RHEL3'">
+selinux --disabled
+</xsl:if>
+authconfig --enableshadow --enablemd5
+timezone --utc US/Central
+bootloader --location=mbr
+reboot
+# The following is the partition information you requested
+# Note that any partitions you deleted are not expressed
+# here so unless you clear all partitions first, this is
+# not guaranteed to work
+clearpart --initlabel --drives=<xsl:value-of select="$ks/rootdisk"/> --all
+autopart
+
+%packages --resolvedeps
+@ system-tools
+@ text-internet
+@ compat-arch-support
+@ server-cfg
+@ development-tools
+
+%post
+#
+# Make Sure DNS works in chroot
+#
+%post --nochroot
+/bin/cp /etc/resolv.conf /mnt/sysimage/etc/resolv.conf
+
+%post
+
+<![CDATA[
+export PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
+
+cat << __EOT__ > /etc/sysctl.conf
+# Enables the magic-sysrq key
+kernel.sysrq = 1
+__EOT__
+
+]]>
+yum mspqa http://<xsl:value-of select="/steeltoe/config/treeserver"/>/dist/qe
+yum <xsl:value-of select="$treename"/> http://<xsl:value-of select="/steeltoe/config/treeserver"/><xsl:value-of select="$dist/path"/>
+__EOT__
+
+echo "Disabling GPG signatures in up2date"
+sed -i -e 's/useGPG=1/useGPG=0/' /etc/sysconfig/rhn/up2date
+echo | up2date --configure
+
+up2date -i qarsh-server
+</xsl:template>
+
+</xsl:stylesheet>