Version 0.5 -- fixed tty problems, added virt-p2v-unpack script.
[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 # $Id$
24
25 # This is the virt-p2v shell script.
26
27 cat > /usr/bin/virt-p2v.sh << '__EOF1234__'
28 @VIRT-P2V.SH@
29 __EOF1234__
30
31 chmod 0755 /usr/bin/virt-p2v.sh
32 /sbin/restorecon /usr/bin/virt-p2v.sh
33
34 # Install custom inittab.
35 cat > /etc/inittab << '__EOF4123__'
36 @INITTAB@
37 __EOF4123__
38
39 # Install custom lvm.conf.new (the shell script will rename to
40 # lvm.conf when the time comes).
41 cat > /etc/lvm/lvm.conf.new << '__EOF4312__'
42 @LVM.CONF@
43 __EOF4312__
44
45 # Turn off firstboot for livecd boots.
46 echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
47
48 # Don't start yum-updatesd for livecd boots.
49 /sbin/chkconfig --level 345 yum-updatesd off
50
51 # Don't start cron/at as they tend to spawn things which are
52 # disk intensive that are painful on a live image.
53 /sbin/chkconfig --level 345 crond off
54 /sbin/chkconfig --level 345 atd off
55 /sbin/chkconfig --level 345 anacron off
56 /sbin/chkconfig --level 345 readahead_early off
57 /sbin/chkconfig --level 345 readahead_later off
58
59 # Stopgap fix for RH #217966; should be fixed in HAL instead
60 touch /media/.hal-mtab
61
62 # Make some mountpoints.
63 mkdir /mnt/root