985dda8914cac973e3c0b0ca9d4f78fdfc654038
[virt-p2v.git] / livecd-post.sh.in
1 # This is the post-configuration section of the kickstart
2 # installer.  It runs inside the live CD chroot while it is
3 # being created (after all the packages have been installed)
4 # but before we make the ISO.
5
6 # Create a 'p2v' init script which runs last thing during the
7 # boot.
8
9 cat > /etc/init.d/p2v << '__EOF4321__'
10 @P2V.INIT@
11 __EOF4321__
12
13 # Make the 'p2v' script run when the live CD boots.
14 chmod 0755 /etc/init.d/p2v
15 /sbin/restorecon /etc/init.d/p2v
16 /sbin/chkconfig --add p2v
17
18 cat > /usr/bin/virt-p2v.sh << '__EOF1234__'
19 @VIRT-P2V.SH@
20 __EOF1234__
21
22 chmod 0755 /usr/bin/virt-p2v.sh
23 /sbin/restorecon /usr/bin/virt-p2v.sh
24
25 # Install custom inittab.
26 cat > /etc/inittab << '__EOF4123__'
27 @INITTAB@
28 __EOF4123__
29
30 # Install custom lvm.conf.new (the shell script will rename to
31 # lvm.conf when the time comes).
32 cat > /etc/lvm/lvm.conf.new << '__EOF4312__'
33 @LVM.CONF@
34 __EOF4312__
35
36 # Turn off firstboot for livecd boots.
37 echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
38
39 # Don't start yum-updatesd for livecd boots.
40 /sbin/chkconfig --level 345 yum-updatesd off
41
42 # Don't start cron/at as they tend to spawn things which are
43 # disk intensive that are painful on a live image.
44 /sbin/chkconfig --level 345 crond off
45 /sbin/chkconfig --level 345 atd off
46 /sbin/chkconfig --level 345 anacron off
47 /sbin/chkconfig --level 345 readahead_early off
48 /sbin/chkconfig --level 345 readahead_later off
49
50 # Stopgap fix for RH #217966; should be fixed in HAL instead
51 touch /media/.hal-mtab
52
53 # Make some mountpoints.
54 mkdir /mnt/root