Manual page with centralised documentation.
[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 # Copyright (C) 2007 Red Hat Inc.
7 # Written by Richard W.M. Jones <rjones@redhat.com>
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22
23 # This is the virt-p2v script.
24 cat > /usr/bin/virt-p2v << '__EOF1234__'
25 @VIRT-P2V@
26 __EOF1234__
27
28 chmod 0755 /usr/bin/virt-p2v
29 /sbin/restorecon /usr/bin/virt-p2v
30
31 # iso-attach program.
32 cat > /usr/bin/iso-attach << '__EOF2134__'
33 @ISO-ATTACH@
34 __EOF2134__
35
36 chmod 0755 /usr/bin/iso-attach
37 /sbin/restorecon /usr/bin/iso-attach
38
39 # Update wrapper - checks the CD-ROM for any attached file.
40 cat > /usr/bin/virt-p2v-update-wrapper << '__EOF1243__'
41 @VIRT-P2V-UPDATE-WRAPPER@
42 __EOF1243__
43
44 chmod 0755 /usr/bin/virt-p2v-update-wrapper
45 /sbin/restorecon /usr/bin/virt-p2v-update-wrapper
46
47 # Install custom inittab.
48 cat > /etc/inittab << '__EOF4123__'
49 @INITTAB@
50 __EOF4123__
51
52 # Install custom lvm.conf.  The script selects this by adjusting
53 # $LVM_SYSTEM_DIR environment variable at the right time.
54 cp -a /etc/lvm /etc/lvm.new
55 cat > /etc/lvm.new/lvm.conf << '__EOF4312__'
56 @LVM.CONF@
57 __EOF4312__
58
59 # Turn off firstboot for livecd boots.
60 echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
61
62 # Don't start yum-updatesd for livecd boots.
63 /sbin/chkconfig --level 345 yum-updatesd off
64
65 # Don't start cron/at as they tend to spawn things which are
66 # disk intensive that are painful on a live image.
67 /sbin/chkconfig --level 345 crond off
68 /sbin/chkconfig --level 345 atd off
69 /sbin/chkconfig --level 345 anacron off
70 /sbin/chkconfig --level 345 readahead_early off
71 /sbin/chkconfig --level 345 readahead_later off
72
73 # Stopgap fix for RH #217966; should be fixed in HAL instead
74 touch /media/.hal-mtab
75
76 # Make some mountpoints.
77 mkdir /mnt/root
78
79 %end