|
install
|
|
<%= @mediapath %>
|
|
lang en_US.UTF-8
|
|
<%= "langsupport --default en_US.UTF-8 en_GB.UTF-8 en_US.UTF-8\n" if @osver < 5 -%>
|
|
<%= "mouse generic3usb --device input/mice\n" if @osver == 3 -%>
|
|
<%= "selinux --disabled\n" if @osver != 3 -%>
|
|
keyboard us
|
|
skipx
|
|
network --bootproto <%= @static ? "static" : "dhcp" %> --hostname <%= @host %>
|
|
rootpw --iscrypted <%= root_pass %>
|
|
firewall --disabled
|
|
authconfig --useshadow --enablemd5 <%= @osver != 3 and @osver != 4 ? '--disablenis' : '' %>
|
|
timezone <%= @osver >= 5 ? 'Europe/London' : 'UTC' %>
|
|
bootloader --location=mbr --append="nofb quiet splash=quiet <%=ks_console%>" <%= grub_pass %>
|
|
<% if @dynamic -%>
|
|
%include /tmp/diskpart.cfg
|
|
<% else -%>
|
|
<%= @host.diskLayout %>
|
|
<% end -%>
|
|
text
|
|
reboot
|
|
|
|
%packages <% if @osver < 5 %> --resolvedeps <% end %>
|
|
ntp
|
|
<% if @osver == 5 -%>
|
|
@core
|
|
@base
|
|
<% elsif @osver == 4 -%>
|
|
device-mapper-multipath
|
|
<% elsif @osver == 3 and @arch == "i386" -%>
|
|
ethereal
|
|
<% end -%>
|
|
<% if @dynamic -%>
|
|
%pre
|
|
<%= @host.diskLayout %>
|
|
<% end -%>
|
|
|
|
%post
|
|
#changing to VT 3 that we can see whats going on....
|
|
/usr/bin/chvt 3
|
|
#update local time
|
|
echo "updating system time"
|
|
/usr/sbin/ntpdate -sub ntp
|
|
/usr/sbin/hwclock --systohc
|
|
|
|
logger "Starting anaconda <%= @host.name -%> postinstall"
|
|
|
|
# install epel if we can
|
|
<%= @epel -%>
|
|
|
|
# update all the base packages from the updates repository
|
|
yum -t -y -e 0 <% @yumrepo -%> upgrade
|
|
|
|
# and add the puppet and ruby-shadow package
|
|
yum -t -y -e 0 <% @yumrepo -%> install puppet
|
|
|
|
echo "Configuring puppet"
|
|
cat > /etc/puppet/puppet.conf << EOF
|
|
<%= snippets "puppet.conf" -%>
|
|
EOF
|
|
|
|
# The puppet service will not start without this file unless it is in test/debug mode. Its contents are updated later in the build process.
|
|
/bin/touch /etc/puppet/namespaceauth.conf
|
|
|
|
# Setup puppet to run on system reboot
|
|
/sbin/chkconfig --level 345 puppet on
|
|
|
|
# Disable most things. Puppet will activate these if required.
|
|
echo "Disabling various system services"
|
|
<% %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| -%>
|
|
/sbin/chkconfig --level 345 <%= service %> off 2>/dev/null
|
|
<% end -%>
|
|
|
|
/usr/sbin/puppetd --config /etc/puppet/puppet.conf -o --tags no_such_tag --server <%= @host.puppetmaster %> --no-daemonize
|
|
|
|
sync
|
|
<%= snippets "vmware" -%>
|
|
|
|
# Inform the build system that we are done.
|
|
echo "Informing Foreman that we are built"
|
|
wget -q -O /dev/null --no-check-certificate <%= foreman_url %>
|
|
exit 0
|