Make 'snapshot' use our standard names.
[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
31 # Turn off firstboot for livecd boots.
32 echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
33
34 # Don't start yum-updatesd for livecd boots.
35 /sbin/chkconfig --level 345 yum-updatesd off
36
37 # Don't start cron/at as they tend to spawn things which are
38 # disk intensive that are painful on a live image.
39 /sbin/chkconfig --level 345 crond off
40 /sbin/chkconfig --level 345 atd off
41 /sbin/chkconfig --level 345 anacron off
42 /sbin/chkconfig --level 345 readahead_early off
43 /sbin/chkconfig --level 345 readahead_later off
44
45 # Stopgap fix for RH #217966; should be fixed in HAL instead
46 touch /media/.hal-mtab