Kickstart: Drop 2nd network interface configuration
[tridge/autocluster.git] / templates / nas-kickstart.cfg
1 # Merged kickstart.  Minor bugfixes come for free bug features should
2 # be configured for the correct version.
3 install
4 cdrom
5 #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]
6 lang @@KS_LANGUAGE@@
7 keyboard @@KS_KEYBOARD@@
8 skipx
9 text
10 network --device eth0 --bootproto dhcp
11 rootpw @@ROOTPASSWORD@@
12 firewall --disabled
13 selinux --disabled
14 authconfig --enableshadow --enablemd5
15 timezone --utc @@TIMEZONE@@
16 poweroff
17 # if you want to have quiet boots add option 'quiet' to the next line
18 # For debugging purposes or in case of trouble boot messages are very helpful
19 bootloader --location=mbr --driveorder=@@SYSTEM_DISK_PREFIX@@a --append="@@KS_KERNEL_OPTS@@"
20
21 # The following is the partition information you requested
22 # Note that any partitions you deleted are not expressed
23 # here so unless you clear all partitions first, this is
24 # not guaranteed to work
25 zerombr
26 clearpart --linux --initlabel
27 part / --ondisk=@@SYSTEM_DISK_PREFIX@@a --fstype="ext4" --size=@@ROOTSIZE@@
28 part swap --ondisk=@@SYSTEM_DISK_PREFIX@@a --size=@@SWAPSIZE@@
29
30
31
32 #The following Part lists all the packages that are needed for the Installation
33 %packages
34
35 @@@KS_RHEL_PACKAGES@@@
36
37 @@KS_EXTRA_PACKAGES@@
38
39 %end
40
41 %post
42
43 (
44 set -x
45
46 @@@KS_RHEL_SERVICES@@@
47
48 for i in @@KS_EXTRA_CHKCONFIGS@@ ; do
49     chkconfig ${i%:*} ${i#*:}
50 done
51
52 ###
53 f="/etc/sysconfig/network"
54 echo "Switching off IPv6 in ${f}..."
55 sed -i.orig -e 's/NETWORKING_IPV6=yes/NETWORKING_IPV6=no/g' "$f"
56
57 ###
58 echo "Changing device scanning filter settings in lvm.conf to reduce boot time..."
59 x1='filter = \[ "a/\.\*/" \]'
60 y1='filter = \[ "a|\^/dev/mapper/\.\*|", "a|\^/dev/sda\.\*|", "r|\.\*|" ]'
61 x2='# By default we accept every block device:'
62 y2='# Exclude some block devices:'
63 sed -i.orig -e "s@${x1}@${y1}@" -e "s@${x2}@${y2}@" /etc/lvm/lvm.conf
64
65 ###
66 echo "Setting the value of max opened files..."
67 cat >/etc/security/limits.d/autocluster.cfg <<EOF
68 # Added by autocluster
69 *       soft    nofile  50000
70 *       hard    nofile  50000
71 *       soft    core    unlimited
72 EOF
73
74 ###
75 echo "Set sshd_config to allow more connections..."
76 cat >>/etc/ssh/sshd_config <<EOF
77 # Added by autocluster
78 MaxStartups 1024
79 EOF
80
81 ###
82 echo "Disabling prelinking in /etc/sysconfig/prelink ..."
83 sed -i.orig -e 's/PRELINKING=yes/# Modified by autocluster\n#&\nPRELINKING=no/' /etc/sysconfig/prelink
84
85 ###
86 echo "Disabling some modules..."
87 mkdir -p /etc/modprobe.d
88 cat >>/etc/modprobe.d/z-autocluster.conf <<EOF
89
90 # Added by autocluster
91 alias pcspkr off
92 alias lp off
93 alias parport off
94 alias parport_pc off
95 alias joydev off
96 alias bluetooth off
97 alias l2cap off
98 alias rfcomm off
99 alias video off
100 alias backlight off
101 alias button off
102 alias battery off
103 alias net-pf-10 off
104 EOF
105
106 ###
107 echo "Enabling core dumps logging for multipathd..."
108 cat >>/etc/sysconfig/multipathd <<EOF
109 # Added by autocluster
110 DAEMON_COREFILE_LIMIT="unlimited"
111 EOF
112
113 @@@KS_STANDARD_POSTINSTALL@@@
114
115 @@@KS_POSTINSTALL_TEMPLATE@@@
116
117 sync
118
119 ) 2>&1 | tee /var/log/ks-postinstall.log > /dev/console
120
121 %end
122