Update.
[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 << '__EOF__'
10 @P2V.INIT@
11 __EOF__
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 << '__EOF__'
19 @VIRT-P2V.SH@
20 __EOF__
21
22 chmod 0755 /usr/bin/virt-p2v.sh
23 /sbin/restorecon /usr/bin/virt-p2v.sh
24
25 # Turn off firstboot for livecd boots.
26 echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
27
28 # Don't start yum-updatesd for livecd boots.
29 chkconfig --level 345 yum-updatesd off
30
31 # Don't start cron/at as they tend to spawn things which are
32 # disk intensive that are painful on a live image.
33 chkconfig --level 345 crond off
34 chkconfig --level 345 atd off
35 chkconfig --level 345 anacron off
36 chkconfig --level 345 readahead_early off
37 chkconfig --level 345 readahead_later off
38
39 # Stopgap fix for RH #217966; should be fixed in HAL instead
40 touch /media/.hal-mtab