summaryrefslogtreecommitdiffstats
path: root/kickstart.xsl
blob: e0a752b17205fce241ff5e15bee7f796edfb5c5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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>