Turn on fuelmenu by default, turn off biosdevname
[fuel.git] / build / f_isoroot / f_kscfg / ks.cfg.orig
1 install
2 text
3 %include /tmp/source.ks
4 reboot --eject
5 lang en_US.UTF-8
6 keyboard us
7 rootpw r00tme
8 timezone --utc Etc/UTC
9 firewall --disabled
10 selinux --disabled
11 # ignore unsupported hardware warning
12 unsupported_hardware
13 # SKIP CONFIGURING X
14 skipx
15 # NEVER ever place zerombr here, it breaks automated installation
16 %include /tmp/bootloader.ks
17 %include /tmp/partition.ks
18
19 # PREINSTALL SECTION
20 # HERE ARE COMMANDS THAT WILL BE LAUNCHED BEFORE
21 # INSTALLATION PROCESS ITSELF
22 %pre
23 #!/bin/sh
24
25 # hard drives
26 drives=""
27 removable_drives=""
28 for drv in `ls -1 /sys/block | grep "sd\|hd\|vd\|cciss"`; do
29     if !(blkid | grep -q "${drv}.*Fuel"); then
30       if (grep -q 0 /sys/block/${drv}/removable); then
31           drives="${drives} ${drv}"
32       else
33           removable_drives="${removable_drives} ${drv}"
34       fi
35     fi
36 done
37 default_drive=`echo ${drives} ${removable_drives} | awk '{print $1}'`
38
39 installdrive=${installdrive:-undefined}
40 forceformat=${forceformat:-no}
41 for I in $(cat /proc/cmdline); do
42   case "$I" in
43     *=*)
44       if ! [[ "${I}" =~ "." ]]; then eval "$I"; fi
45     ;;
46   esac
47 done
48
49 set ${drives} ${removable_drives}
50 numdrives=`echo $#`
51
52 tgtdrive="${installdrive}"
53
54 function confirm_format {
55   check_drive="$1"
56   local confirm_format="no"
57
58   if [[ "$forceformat" == "yes" ]] ; then
59     return 0
60   fi
61
62   if parted -s /dev/$check_drive print &>/dev/null ; then
63     echo
64     echo "$check_drive drive contains partition table:"
65     parted -s /dev/$check_drive print
66     echo
67     read -p "Are you sure you want to erase ALL data on disk $check_drive? (y/N)" confirm_format
68     if [[ "$confirm_format" == "y" ]] || [[ "$confirm_format" == "Y" ]] || [[ "$forceformat" == "yes" ]]; then
69       return 0
70     else
71       return 1
72     fi
73   else
74     return 0
75   fi
76 }
77
78 format_confirmed="no"
79
80 if [ $numdrives -lt 1 ]; then
81     exec < /dev/tty3 > /dev/tty3 2>&1
82     chvt 3
83     clear
84     echo
85     echo '********************************************************************'
86     echo '*                            E R R O R                             *'
87     echo '*                                                                  *'
88     echo '*      There is no suitable media available for installation.      *'
89     echo '*                Please attach a drive and try again.              *'
90     echo '*                                                                  *'
91     echo '********************************************************************'
92     echo
93     read -p "Press Enter to shut down the system: " _
94     poweroff
95 fi
96
97 if [ ${numdrives} -gt 1 ] || [ `echo ${drives} | wc -w` -eq 0 ] ; then
98     exec < /dev/tty3 > /dev/tty3 2>&1
99     chvt 3
100     while [ "${tgtdrive}" = "undefined" ]; do
101         clear
102         echo
103         echo '********************************************************************************'
104         echo '*                                 W A R N I N G                                *'
105         echo '*                                                                              *'
106         echo '*  Which of the detected hard drives do you want to be used as                 *'
107         echo '*  the installation target?                                                    *'
108         echo '*                                                                              *'
109         echo '********************************************************************************'
110         echo
111         echo "Possible choices"
112         echo "Persistent drives: ${drives}"
113         echo "Removable drives: ${removable_drives}"
114         echo
115         if [ `echo ${drives} | wc -w` -eq 1 ] ; then
116             read -t 30 -p "Choose hard drive: " tgtdrive || tgtdrive=$default_drive
117         else
118             read -p "Choose hard drive: " tgtdrive
119         fi
120         match="no"
121         for drive in ${drives[@]} ${removable_drives[@]}; do
122           if [[ "$drive" == "$tgtdrive" ]] && match="yes" ; then
123             if confirm_format $tgtdrive ; then
124               format_confirmed="yes"
125               break
126             else
127               tgtdrive="undefined"
128               read -p "You may select another disk. Press Enter to continue." _
129             fi
130           fi
131         done
132         if [[ "$match" == "no" ]]; then
133           tgtdrive="undefined"
134           read -p "Invalid choice. Press Enter to continue." _
135         fi
136     done
137     clear
138     chvt 1
139 else
140     tgtdrive=`echo ${drives} | sed -e "s/^\s*//" -e "s/\s*$//"`
141 fi
142
143 if [ "$format_confirmed" != "yes" ] ; then
144   exec < /dev/tty3 > /dev/tty3 2>&1
145   chvt 3
146   if ! confirm_format $tgtdrive ; then
147       clear
148       echo
149       echo '********************************************************************'
150       echo '*                            E R R O R                             *'
151       echo '*                                                                  *'
152       echo '*           Disk $tgtdrive contains active partition(s).           *'
153       echo '*        Installation cannot continue without confirmation.        *'
154       echo '*                                                                  *'
155       echo '********************************************************************'
156       echo
157       read -p "Press Enter to restart: " _
158       reboot
159   fi
160   chvt 1
161 fi
162
163 # verify tgtdrive is at least 41GB
164 tgtdrivesize=$(( $(cat "/sys/class/block/${tgtdrive}/size") / 2 / 1024 ))
165 if [ $tgtdrivesize -lt 41984 ]; then
166     exec < /dev/tty3 > /dev/tty3 2>&1
167     chvt 3
168     clear
169     echo
170     echo '********************************************************************'
171     echo '*                            E R R O R                             *'
172     echo '*                                                                  *'
173     echo '*  Your disk is under 41GB in size. Installation cannot continue.  *'
174     echo '*             Restart installation with a larger disk.             *'
175     echo '*                                                                  *'
176     echo '********************************************************************'
177     echo
178     read -p "Press Enter to restart: " _
179     reboot
180 fi
181
182 # paths in /dev have "/" instead of "!" for cciss devices
183 tgtdrive=$(echo $tgtdrive | sed -e 's/!/\//')
184
185 # source
186 if test -e /dev/disk/by-label/"OpenStack_Fuel"; then
187     echo "harddrive --partition=LABEL="OpenStack_Fuel" --dir=/" > /tmp/source.ks
188 elif test -e /dev/disk/by-uuid/will_be_substituted_with_actual_uuid; then
189     echo "harddrive --partition=UUID=will_be_substituted_with_actual_uuid --dir=/" > /tmp/source.ks
190 else
191     echo "cdrom" > /tmp/source.ks
192 fi
193
194 vgremove -ff os
195 dd if=/dev/zero of=/dev/${tgtdrive} bs=10M count=10
196 sleep 3
197 hdparm -z /dev/${tgtdrive}
198 parted -s /dev/${tgtdrive} mklabel gpt
199 parted -a none -s /dev/${tgtdrive} unit MiB mkpart primary 0 24
200 parted -s /dev/${tgtdrive} set 1 bios_grub on
201 parted -a none -s /dev/${tgtdrive} unit MiB mkpart primary fat16 24 224
202 parted -s /dev/${tgtdrive} set 2 boot on
203 parted -a none -s /dev/${tgtdrive} unit MiB mkpart primary 224 424
204 sleep 3
205 hdparm -z /dev/${tgtdrive}
206
207 # partition
208
209 # This adds support for the p seperator required for cciss devices
210 if echo ${tgtdrive} | grep -q -e cciss ; then
211     bootdev=${tgtdrive}p
212 else
213     bootdev=${tgtdrive}
214 fi
215 echo > /tmp/partition.ks
216 echo "partition /boot --onpart=/dev/${bootdev}3" >> /tmp/partition.ks
217 echo "partition /boot/efi --onpart=/dev/${bootdev}2" >> /tmp/partition.ks
218 echo "partition pv.001 --ondisk=${tgtdrive} --size=41000 --grow" >> /tmp/partition.ks
219 echo "volgroup os pv.001" >> /tmp/partition.ks
220 echo "logvol swap --vgname=os --recommended --name=swap" >> /tmp/partition.ks
221 echo "logvol / --vgname=os --size=10000 --name=root --fstype=ext4" >> /tmp/partition.ks
222 echo "logvol /var --vgname=os --size=10000 --percent 30 --grow --name=var --fstype=ext4" >> /tmp/partition.ks
223 echo "logvol /var/lib/docker --vgname=os --size=17000  --percent 20 --grow --name=varlibdocker --fstype=ext4" >> /tmp/partition.ks
224 echo "logvol /var/log --vgname=os --size=4096 --percent 50 --grow --name=varlog --fstype=ext4" >> /tmp/partition.ks
225
226
227 # bootloader
228 echo "bootloader --location=partition --driveorder=${tgtdrive} --append=' biosdevname=0 crashkernel=none'" > /tmp/bootloader.ks
229
230 # Anaconda can not install grub 0.97 on disks which are >4T.
231 # The reason is that grub does not support such large geometries
232 # and it simply thinks that the cylinder number has negative value.
233 # Here we just set geometry manually so that grub thinks that disk
234 # size is equal to 1G.
235 # 130 cylinders * (16065 * 512 = 8225280 bytes) = 1G
236 echo "%post --nochroot --log=/mnt/sysimage/root/anaconda-post-partition.log" > /tmp/post_partition.ks
237 echo "echo \"device (hd0) /dev/${tgtdrive}\" >> /tmp/grub.script" >> /tmp/post_partition.ks
238 echo "echo \"geometry (hd0) 130 255 63\" >> /tmp/grub.script" >> /tmp/post_partition.ks
239 echo "echo \"root (hd0,2)\" >> /tmp/grub.script" >> /tmp/post_partition.ks
240 echo "echo \"install /grub/stage1 (hd0) /grub/stage2 p /grub/grub.conf\" >> /tmp/grub.script" >> /tmp/post_partition.ks
241 echo "echo quit >> /tmp/grub.script" >> /tmp/post_partition.ks
242 echo "cat /tmp/grub.script | chroot /mnt/sysimage /sbin/grub --no-floppy --batch" >> /tmp/post_partition.ks
243
244 %end
245
246 %packages --nobase --excludedocs
247 @Core
248 fuel
249 fuel-library >= 7.0
250 fuel-dockerctl
251 authconfig
252 bind-utils
253 cronie
254 crontabs
255 curl
256 daemonize
257 dhcp
258 docker-io
259 fuel-bootstrap-image
260 fuel-bootstrap-image-builder
261 fuel-createmirror
262 fuel-target-centos-images6.6
263 fuel-package-updates
264 fuelmenu
265 fuel-docker-images
266 gdisk
267 lrzip
268 lsof
269 man
270 mlocate
271 nmap-ncat
272 ntp
273 ntpdate
274 openssh-clients
275 policycoreutils
276 python-daemon
277 rsync
278 ruby21-puppet
279 ruby21-rubygem-netaddr
280 ruby21-rubygem-openstack
281 selinux-policy-targeted
282 strace
283 subscription-manager
284 sysstat
285 system-config-firewall-base
286 tcpdump
287 telnet
288 vim-enhanced
289 virt-what
290 wget
291 yum
292 yum-plugin-priorities
293
294 %include /tmp/post_partition.ks
295
296 # POSTINSTALL SECTION
297 # HERE ARE COMMANDS THAT WILL BE LAUNCHED JUST AFTER
298 # INSTALLATION ITSELF COMPLETED
299 %post
300 echo -e "modprobe nf_conntrack_ipv4\nmodprobe nf_conntrack_ipv6\nmodprobe nf_conntrack_tftp\nmodprobe nf_nat_tftp" >> /etc/rc.modules
301 chmod +x /etc/rc.modules
302 echo -e "net.nf_conntrack_max=1048576" >> /etc/sysctl.conf
303 mkdir -p /var/log/coredump
304 echo -e "kernel.core_pattern=/var/log/coredump/core.%e.%p.%h.%t" >> /etc/sysctl.conf
305 chmod 777 /var/log/coredump
306 echo -e "* soft core unlimited\n* hard core unlimited" >> /etc/security/limits.conf
307
308 # Mount installation media in chroot
309 %post --nochroot --log=/mnt/sysimage/root/anaconda-post-before-chroot.log
310 #!/bin/sh
311
312 set -x
313
314 SOURCE="/mnt/sysimage/tmp/source"
315
316 for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
317
318 mkdir -p "${SOURCE}"
319
320 case "${repo}" in
321   nfs:*)
322     nfs_url="${repo#nfs:}"
323     mount -t nfs "${nfs_url}" "${SOURCE}"
324   ;;
325   *)
326     if [ -d "/mnt/source" ]; then
327       mount -o bind "/mnt/source" "${SOURCE}"
328     fi
329   ;;
330 esac
331
332 %post --log=/root/anaconda-post-after-chroot.log
333 #!/bin/bash
334
335 set -x
336
337 function save_cfg {
338     scrFile="/etc/sysconfig/network-scripts/ifcfg-$admin_interface"
339     search="domain $domain\nsearch $domain"
340     sed -i -e 's#^\(HOSTNAME=\).*$#\1'"$hostname"'#' /etc/sysconfig/network
341     grep -q "^\s*$ip\s+$hostname" /etc/hosts || echo "$ip $hostname" >> /etc/hosts
342     echo "${search}\nnameserver 127.0.0.1" > /etc/resolv.conf
343     [ $dns1 ] && echo -e "${search}\nnameserver $dns1" > /etc/resolv.conf
344     [ $dns1 ] && echo -e "${search}\nnameserver $dns1" > /etc/dnsmasq.upstream
345     [ $dns2 ] && echo "nameserver $dns2" >> /etc/resolv.conf
346     [ $dns2 ] && echo "nameserver $dns2" >> /etc/dnsmasq.upstream
347
348     echo DEVICE=$admin_interface > $scrFile
349     echo ONBOOT=yes >> $scrFile
350     echo NM_CONTROLLED=no >> $scrFile
351     echo HWADDR=$hwaddr >> $scrFile
352     echo USERCTL=no >> $scrFile
353     echo PEERDNS=no >> $scrFile
354     if [ $ip ]; then
355         echo BOOTPROTO=static >> $scrFile
356         echo IPADDR=$ip >> $scrFile
357         echo NETMASK=$netmask >> $scrFile
358     else
359         echo BOOTPROTO=dhcp >> $scrFile
360     fi
361     scrDHCPFile="/etc/sysconfig/network-scripts/ifcfg-$dhcp_interface"
362     #Ignore gateway and set up DHCP if it is used, otherwise apply it
363     if [ $dhcp_interface ] && [ "$dhcp_interface" != "$admin_interface" ]; then
364         echo "DEVICE=$dhcp_interface" > $scrDHCPFile
365         echo "BOOTPROTO=dhcp" >> $scrDHCPFile
366         echo "ONBOOT=yes" >> $scrDHCPFile
367         echo "USERCTL=no" >> $scrDHCPFile
368     else
369         echo GATEWAY=$gw >> /etc/sysconfig/network
370     fi
371     [ -n "$build_images" -a "$build_images" != "0" ] && echo -e "$build_images" > /root/.build_images
372 }
373
374 # Default FQDN
375 hostname="nailgun.mirantis.com"
376
377 for I in `cat /proc/cmdline`; do case "$I" in *=*) eval $I;; esac ; done
378 hostname=$hostname
379 domain=${hostname#*.}
380 ip=$ip
381 netmask=$netmask
382 gw=$gw
383 admin_interface=${admin_interface:-"eth0"}
384 hwaddr=`ifconfig $admin_interface | grep -i hwaddr | sed -e 's#^.*hwaddr[[:space:]]*##I'`
385 dhcp_interface=$dhcp_interface
386 build_images=$build_images
387 wait_for_external_config=$wait_for_external_config
388 save_cfg
389
390 # Mounting installation source
391 SOURCE=/tmp/source
392 FS=/tmp/fs
393
394 echo
395 mkdir -p ${SOURCE}
396 mkdir -p ${FS}
397
398 if test -e /dev/disk/by-label/"OpenStack_Fuel"; then
399     mount /dev/disk/by-label/"OpenStack_Fuel" ${SOURCE}
400 elif test -e /dev/disk/by-uuid/will_be_substituted_with_actual_uuid; then
401     mount /dev/disk/by-uuid/will_be_substituted_with_actual_uuid ${FS}
402     mount -o loop ${FS}/nailgun.iso ${SOURCE}
403 fi
404
405 OPENSTACK_VERSION=`cat ${SOURCE}/openstack_version`
406
407 # ----------------------
408 # UNPACKING REPOSITORIES
409 # ----------------------
410
411 wwwdir="/var/www/nailgun"
412 repodir="${wwwdir}/${OPENSTACK_VERSION}"
413
414 # Copying Centos files
415 mkdir -p ${repodir}/centos/x86_64
416 cp -r ${SOURCE}/images ${repodir}/centos/x86_64
417 cp -r ${SOURCE}/isolinux ${repodir}/centos/x86_64
418 cp -r ${SOURCE}/repodata ${repodir}/centos/x86_64
419 cp -r ${SOURCE}/Packages ${repodir}/centos/x86_64
420 cp ${SOURCE}/.treeinfo ${repodir}/centos/x86_64
421
422 # Copying Ubuntu files
423 mkdir -p ${repodir}/ubuntu/x86_64/images
424 cp -r ${SOURCE}/ubuntu/dists ${repodir}/ubuntu/x86_64
425 cp -r ${SOURCE}/ubuntu/pool ${repodir}/ubuntu/x86_64
426
427 # We do not ship debian-installer kernel and initrd on ISO.
428 # But we still need to be able to create ubuntu cobbler distro
429 # which requires kernel and initrd to be available. So, we
430 # just touch these files to work around cobbler's limitation.
431 touch ${repodir}/ubuntu/x86_64/images/linux
432 touch ${repodir}/ubuntu/x86_64/images/initrd.gz
433
434 # make links for backward compatibility
435 ln -s ${repodir}/centos ${wwwdir}/centos
436 ln -s ${repodir}/ubuntu ${wwwdir}/ubuntu
437
438 # --------------------------
439 # UNPACKING PUPPET MANIFESTS
440 # --------------------------
441
442 # create folders
443 #mkdir -p /etc/puppet/${OPENSTACK_VERSION}/manifests/
444 #mkdir -p /etc/puppet/${OPENSTACK_VERSION}/modules/
445 #rm -rf /etc/puppet/modules/
446
447 # TODO(ikalnitsky): investigate why we need this
448 #cp ${SOURCE}/puppet-slave.tgz ${wwwdir}/
449
450 # place modules and manifests
451 #tar zxf ${SOURCE}/puppet-slave.tgz -C /etc/puppet/${OPENSTACK_VERSION}/modules
452 #cp /etc/puppet/${OPENSTACK_VERSION}/modules/osnailyfacter/examples/site.pp /etc/puppet/${OPENSTACK_VERSION}/manifests/site.pp
453 cp ${SOURCE}/centos-versions.yaml ${SOURCE}/ubuntu-versions.yaml /etc/puppet/${OPENSTACK_VERSION}/manifests/
454
455 # make links for backward compatibility
456 #pushd /etc/puppet
457 #ln -s ${OPENSTACK_VERSION}/manifests/ /etc/puppet/manifests
458 #ln -s ${OPENSTACK_VERSION}/modules/ /etc/puppet/modules
459 #popd
460
461 cp ${SOURCE}/send2syslog.py /bin/send2syslog.py
462 mkdir -p /var/lib/hiera
463 touch /var/lib/hiera/common.yaml /etc/puppet/hiera.yaml
464
465 # Prepare local repository specification
466 rm /etc/yum.repos.d/CentOS*.repo
467 cat > /etc/yum.repos.d/nailgun.repo << EOF
468 [nailgun]
469 name=Nailgun Local Repo
470 baseurl=file:/var/www/nailgun/${OPENSTACK_VERSION}/centos/x86_64
471 gpgcheck=0
472 EOF
473
474 # Disable subscription-manager plugins
475 sed -i 's/^enabled.*/enabled=0/' /etc/yum/pluginconf.d/product-id.conf || :
476 sed -i 's/^enabled.*/enabled=0/' /etc/yum/pluginconf.d/subscription-manager.conf || :
477
478 # Disable GSSAPI in ssh server config
479 sed -i -e "/^\s*GSSAPICleanupCredentials yes/d" -e "/^\s*GSSAPIAuthentication yes/d" /etc/ssh/sshd_config
480
481 # Enable MOTD banner in sshd
482 sed -i -e "s/^\s*PrintMotd no/PrintMotd yes/g" /etc/ssh/sshd_config
483
484 # Add note regarding local repos creation to MOTD
485 cat >> /etc/motd << EOF
486
487 All environments use online repositories by default.
488 Use the following commands to create local repositories
489 on master node and change default repository settings:
490
491 * CentOS: fuel-package-updates (see --help for options)
492 * Ubuntu: fuel-createmirror (see --help for options)
493
494 Please refer to the following guide for more information:
495 https://docs.mirantis.com/openstack/fuel/fuel-7.0/reference-architecture.html#fuel-rep-mirror
496
497 EOF
498
499 # Copying bootstrap_admin_node.sh, chmod it and
500 # adding /etc/init/bootstrap_admin_node.conf
501 cp ${SOURCE}/bootstrap_admin_node.sh /usr/local/sbin/bootstrap_admin_node.sh
502 chmod 0777 /usr/local/sbin/bootstrap_admin_node.sh
503 cp ${SOURCE}/bootstrap_admin_node.conf /etc/init/bootstrap_admin_node.conf
504 echo "ENABLED=1" > /etc/sysconfig/bootstrap_admin_node
505
506 # Copying version.yaml file. It contains COMMIT_SHA of last commit.
507 RELEASE=$(awk '/release/{gsub(/"/, "");print $2}' ${SOURCE}/version.yaml)
508 mkdir -p /etc/nailgun /etc/fuel/${RELEASE} /etc/fuel/release_versions
509 cp ${SOURCE}/version.yaml /etc/nailgun/version.yaml
510 cp ${SOURCE}/version.yaml /etc/fuel/${RELEASE}/version.yaml
511 ln -s /etc/fuel/${RELEASE}/version.yaml /etc/fuel/version.yaml
512 cp ${SOURCE}/version.yaml /etc/fuel/release_versions/`cat  ${SOURCE}/openstack_version`.yaml
513
514 # Generete Fuel UUID
515 uuidgen > /etc/fuel/fuel-uuid
516
517 # Run fuel menu 
518 [ -z "$showmenu" ] && showmenu="no"
519
520 # Pause during bootstrap_admin_node to wait for external config
521 [ -z "$wait_for_external_config" ] && wait_for_external_config="no"
522
523
524 # Prepare bootstrap_admin_node config
525 cat > /etc/fuel/bootstrap_admin_node.conf << EOF
526 #Set to yes to run Fuel Setup
527 #Set to no to accept default settings
528 ADMIN_INTERFACE=${admin_interface}
529 showmenu=${showmenu}
530 wait_for_external_config=${wait_for_external_config}
531 EOF
532
533 # Prepare custom /etc/issue logon banner and script for changing IP in it
534 cat > /etc/issue << EOF
535 #########################################
536 #       Welcome to the Fuel server      #
537 #########################################
538 Server is running on \m platform
539
540 Fuel UI is available on:
541 https://:8443
542
543 Default administrator login:    root
544 Default administrator password: r00tme
545
546 Default Fuel UI login: admin
547 Default Fuel UI password: admin
548
549 Please change root password on first login.
550
551 EOF
552
553
554 cat >> '/etc/rc.local' << EOF
555 first=yes
556 for ip in \$(ip -o -4 addr | grep "eth." | awk '{print \$4 }' | cut -d/ -f1); do
557 if [ "\$first" = "yes" ]; then
558   ipstr="Fuel UI is available on: https://\$ip:8443"
559   first=no
560 else
561   ipstr=\$(printf "%s\n%25s%s" "\$ipstr" " " "https://\$ip:8443")
562 fi
563 done
564 tmpissue=\$(mktemp)
565 while read -r line; do
566   if [[ "\$line" =~ "Fuel UI is available on" ]]; then
567     echo -e "\$ipstr" >> \$tmpissue
568   elif [[ "\$line" =~ :8443$ ]]; then
569     :
570   else
571     echo -e "\$line" >> \$tmpissue
572   fi
573 done < /etc/issue
574 mv "\$tmpissue" /etc/issue
575
576 EOF
577
578
579 # Unmounting source
580 umount -f ${SOURCE}
581 rm -rf ${SOURCE}
582
583 umount -f ${FS} || true
584 rm -rf ${FS}
585
586 echo "tos orphan 7" >> /etc/ntp.conf
587
588 # Do not show error message on ntpdate failure. Customers should not be confused
589 # if admin node does not have access to the internet time servers.
590 sed -i /etc/rc.d/init.d/ntpdate -e 's/\([ $RETVAL -eq 0 ] && success || \)failure/\1success/'
591
592 # Disabling splash
593 sed -i --follow-symlinks -e '/^\skernel/ s/rhgb//' /etc/grub.conf
594 sed -i --follow-symlinks -e '/^\skernel/ s/quiet//' /etc/grub.conf
595
596 # Disabling console clearing
597 sed -i 's/getty/getty --noclear/' /etc/init/tty.conf
598
599 # Disabling starting first console from start-ttys service
600 sed -i --follow-symlinks -e 's/ACTIVE_CONSOLES=.*/ACTIVE_CONSOLES=\/dev\/tty\[2-6\]/' /etc/sysconfig/init
601
602 # Copying default bash settings to the root directory
603 cp -f /etc/skel/.bash* /root/
604
605 # Blacklist i2c_piix4 module for VirtualBox so it does not create kernel errors
606 [[ $(virt-what) = "virtualbox" ]] && echo "blacklist i2c_piix4" > /etc/modprobe.d/blacklist-i2c-piix4.conf
607
608 %end