summaryrefslogtreecommitdiffstats
path: root/templates/nas-kickstart.cfg
blob: 5816af5b5952d098c4121a0eed92057dd482a3b5 (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Merged kickstart.  Minor bugfixes come for free bug features should
# be configured for the correct version.
install
cdrom
#ignoredisk --drives=[sdb,sdc,sdd,sde,sdf,sdg,sdh,sdi,sdj,sdk,sdl,sdm,sdn,sdo,sdp,sdq,sdr,sds,sdt,sdu,sdv,sdw,sdx,sdy,sdz,sdaa]
lang @@KS_LANGUAGE@@
keyboard @@KS_KEYBOARD@@
skipx
text
network --device eth0 --bootproto dhcp
network --device eth1 --onboot no --bootproto static
rootpw @@ROOTPASSWORD@@
firewall --disabled
selinux --disabled
authconfig --enableshadow --enablemd5
timezone --utc @@TIMEZONE@@
poweroff
# if you want to have quiet boots add option 'quiet' to the next line
# For debugging purposes or in case of trouble boot messages are very helpful
bootloader --location=mbr --driveorder=@@SYSTEM_DISK_PREFIX@@a --append="@@KS_KERNEL_OPTS@@"

# 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
zerombr
clearpart --linux --initlabel
part / --ondisk=@@SYSTEM_DISK_PREFIX@@a --fstype="ext4" --size=@@ROOTSIZE@@
part swap --ondisk=@@SYSTEM_DISK_PREFIX@@a --size=@@SWAPSIZE@@



#The following Part lists all the packages that are needed for the Installation
%packages

@@@KS_RHEL_PACKAGES@@@

@@KS_EXTRA_PACKAGES@@

%end

%post

(
set -x

@@@KS_RHEL_SERVICES@@@

for i in @@KS_EXTRA_CHKCONFIGS@@ ; do
    chkconfig ${i%:*} ${i#*:}
done

###
f="/etc/sysconfig/network"
echo "Switching off IPv6 in ${f}..."
sed -i.orig -e 's/NETWORKING_IPV6=yes/NETWORKING_IPV6=no/g' "$f"

###
echo "Changing device scanning filter settings in lvm.conf to reduce boot time..."
x1='filter = \[ "a/\.\*/" \]'
y1='filter = \[ "a|\^/dev/mapper/\.\*|", "a|\^/dev/sda\.\*|", "r|\.\*|" ]'
x2='# By default we accept every block device:'
y2='# Exclude some block devices:'
sed -i.orig -e "s@${x1}@${y1}@" -e "s@${x2}@${y2}@" /etc/lvm/lvm.conf

###
echo "Setting the value of max opened files..."
cat >/etc/security/limits.d/autocluster.cfg <<EOF
# Added by autocluster
*	soft	nofile	50000
*	hard	nofile	50000
*	soft	core	unlimited
EOF

###
echo "Set sshd_config to allow more connections..."
cat >>/etc/ssh/sshd_config <<EOF
# Added by autocluster
MaxStartups 1024
EOF

###
echo "Disabling prelinking in /etc/sysconfig/prelink ..."
sed -i.orig -e 's/PRELINKING=yes/# Modified by autocluster\n#&\nPRELINKING=no/' /etc/sysconfig/prelink

###
echo "Disabling some modules..."
mkdir -p /etc/modprobe.d
cat >>/etc/modprobe.d/z-autocluster.conf <<EOF

# Added by autocluster
alias pcspkr off
alias lp off
alias parport off
alias parport_pc off
alias joydev off
alias bluetooth off
alias l2cap off
alias rfcomm off
alias video off
alias backlight off
alias button off
alias battery off
alias net-pf-10 off
alias ipv6 off
EOF

###
echo "Enabling core dumps logging for multipathd..."
cat >>/etc/sysconfig/multipathd <<EOF
# Added by autocluster
DAEMON_COREFILE_LIMIT="unlimited"
EOF

@@@KS_STANDARD_POSTINSTALL@@@

@@@KS_POSTINSTALL_TEMPLATE@@@

sync

) 2>&1 | tee /var/log/ks-postinstall.log > /dev/console

%end