Statistics
| Branch: | Tag: | Revision:

root / app / views / unattended / kickstart.rhtml @ develop

History | View | Annotate | Download (2.2 KB)

1
install
2
<%= @mediapath %>
3
lang en_US.UTF-8
4
<%= "langsupport --default en_US.UTF-8 en_GB.UTF-8 en_US.UTF-8\n" if @osver < 5 -%>
5
<%= "mouse generic3usb --device input/mice\n" if @osver == 3 -%>
6
<%= "selinux --disabled\n" if @osver != 3 -%>
7
keyboard us
8
skipx
9
network --bootproto <%= @static ? "static" : "dhcp" %> --hostname <%= @host %>
10
rootpw --iscrypted <%= root_pass %>
11
firewall --disabled
12
authconfig --useshadow --enablemd5 <%= @osver != 3 and @osver != 4 ? '--disablenis' : '' %>
13
timezone <%= @osver >= 5 ? 'Europe/London' : 'UTC' %>
14
bootloader --location=mbr --append="nofb quiet splash=quiet <%=ks_console%>" <%= grub_pass %>
15
<% if @dynamic -%>
16
%include /tmp/diskpart.cfg
17
<% else -%>
18
<%= @host.diskLayout %>
19
<% end -%>
20
text
21
reboot
22
23
%packages <% if @osver < 5 %> --resolvedeps <% end %>
24
ntp
25
<% if @osver == 5 -%>
26
@core
27
@base
28
<% elsif @osver == 4 -%>
29
device-mapper-multipath
30
<% elsif @osver == 3 and @arch == "i386" -%>
31
ethereal
32
<% end -%>
33
<% if @dynamic -%>
34
%pre
35
<%= @host.diskLayout %>
36
<% end -%>
37
38
%post
39
#changing to VT 3 that we can see whats going on....
40
/usr/bin/chvt 3
41
#update local time
42
echo "updating system time"
43
/usr/sbin/ntpdate -sub ntp
44
/usr/sbin/hwclock --systohc
45
46
logger "Starting anaconda <%= @host %> postinstall"
47
48
# install epel if we can
49
<%= @epel -%>
50
51
# update all the base packages from the updates repository
52
yum -t -y -e 0 update
53
54
# and add the puppet and ruby-shadow package
55
yum -t -y -e 0 install puppet
56
57
echo "Configuring puppet"
58
cat > /etc/puppet/puppet.conf << EOF
59
<%= snippets "puppet.conf" -%>
60
EOF
61
62
# Setup puppet to run on system reboot
63
/sbin/chkconfig --level 345 puppet on
64
65
# Disable most things. Puppet will activate these if required.
66
echo "Disabling various system services"
67
<% %w{autofs gpm sendmail cups iptables ip6tables auditd arptables_jf xfs pcmcia isdn rawdevices hpoj bluetooth openibd avahi-daemon avahi-dnsconfd hidd hplip pcscd restorecond mcstrans rhnsd yum-updatesd}.each do |service| -%>
68
  /sbin/chkconfig --level 345 <%= service %> off 2>/dev/null
69
<% end -%>
70
71
/usr/sbin/puppetd --config /etc/puppet/puppet.conf -o --tags no_such_tag --server <%= @host.puppetmaster %>  --no-daemonize
72
73
sync
74
75
# Inform the build system that we are done.
76
echo "Informing Foreman that we are built"
77
wget -q -O /dev/null --no-check-certificate <%= foreman_url %>
78
exit 0