Added /etc/event.d/tty1 for upstart-based systems.
[virt-p2v.git] / p2v.ks.in
1 # LiveCD kickstart file for virt-p2v
2 # @configure_input@
3 #
4 # Copyright (C) 2007-2008 Red Hat Inc.
5 # Written by Richard W.M. Jones <rjones@redhat.com>
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20
21 lang @CD_LANG@
22 keyboard @CD_KEYBOARD@
23 timezone @CD_TIMEZONE@
24 auth --useshadow --enablemd5
25 selinux --enforcing
26 firewall --disabled
27
28 # Basic Fedora repository and updates.
29 repo --name=released --baseurl=@CD_BASE_URL@
30 repo --name=updates --baseurl=@CD_UPDATES_URL@
31 #repo --name=released --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-@CD_BASE@&arch=@CD_ARCH@
32
33 # A local repository if selected by ./configure --enable-localrepo=...
34 @LOCALREPO@
35
36 # The p2vrepo subdirectory, containing virt-p2v RPM.
37 repo --name=p2v --baseurl=file://@abs_top_builddir@/p2vrepo
38
39 %packages --excludedocs
40 bash
41 kernel
42 syslinux
43 passwd
44 policycoreutils
45 chkconfig
46 authconfig
47 rootfiles
48
49 # For unicode console support.
50 kbd
51
52 # dd, sleep, sync, etc.
53 coreutils
54
55 # For device mapping
56 device-mapper
57 util-linux-ng
58 module-init-tools
59 gzip
60 kpartx
61
62 # For remote communications
63 openssh-clients
64 nc
65
66 # For the shell script
67 grep
68 sed
69 gawk
70 findutils
71
72 # For IP configuration
73 iproute
74 net-tools
75
76 # For network configuration
77 dhclient
78
79 # Some other generally useful packages
80 which
81 perl
82 rpm
83 lsof
84 strace
85 vim-minimal
86 vim-enhanced
87 bind-utils
88 file
89
90 # virt-p2v package and its deps
91 ocaml
92 ocaml-findlib
93 ocaml-pcre
94 ocaml-extlib
95 ocaml-xml-light
96 ocaml-libvirt
97 ocaml-newt
98 ocaml-gettext
99 virt-p2v
100
101
102 %post --nochroot
103
104 # These files have to be copied from the build directory into the
105 # squashfs.  See also:
106 # http://www.mail-archive.com/fedora-livecd-list@redhat.com/msg01470.html
107
108 # Just check everything exists, because kickstart will not give
109 # an error if files or paths are missing.
110 if test "x$INSTALL_ROOT" = "x"; then ERROR=1; fi
111 if ! test -d "$INSTALL_ROOT/usr/bin"; then ERROR=1; fi
112 if ! test -d "@abs_top_srcdir@"; then ERROR=1; fi
113 if ! test -d "@abs_top_srcdir@/extras"; then ERROR=1; fi
114
115 if test "x$ERROR" = "x1"; then
116     echo "**************************************************"
117     echo "**************************************************"
118     echo "**************************************************"
119     echo "Missing files or directories found.  This ISO will be bad."
120     echo "**************************************************"
121     echo "**************************************************"
122     echo "**************************************************"
123     # Exit 1 won't stop anything, but it makes me feel better.
124     exit 1
125 fi
126
127 cp -a $INSTALL_ROOT/etc/lvm $INSTALL_ROOT/etc/lvm.new
128 install -m 0644 -o root -g root @abs_top_srcdir@/lvm.conf \
129         $INSTALL_ROOT/etc/lvm.new
130
131 # Copy everything under extras to the squashfs /extras.
132 cp -a @abs_top_srcdir@/extras $INSTALL_ROOT/extras
133
134 %end
135
136 %post
137
138 # Restore SELinux permissions on installed binaries.
139 /sbin/restorecon /usr/bin/virt-p2v
140 /sbin/restorecon /usr/bin/virt-p2v-update-wrapper
141 /sbin/restorecon /usr/bin/iso-attach
142
143 # Turn off firstboot for livecd boots.
144 echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
145
146 # Don't start yum-updatesd for livecd boots.
147 /sbin/chkconfig --level 345 yum-updatesd off
148
149 # Don't start cron/at as they tend to spawn things which are
150 # disk intensive that are painful on a live image.
151 /sbin/chkconfig --level 345 crond off
152 /sbin/chkconfig --level 345 atd off
153 /sbin/chkconfig --level 345 anacron off
154 /sbin/chkconfig --level 345 readahead_early off
155 /sbin/chkconfig --level 345 readahead_later off
156
157 # Stopgap fix for RH #217966; should be fixed in HAL instead
158 touch /media/.hal-mtab
159
160 # Make some mountpoints.
161 mkdir /mnt/root
162
163 # Remove some unused files.
164 rm -rf /usr/share/man           ;# 20 MB
165 #rm -rf /usr/share/doc          ;# 44 MB
166 #rm -rf /usr/share/locale       ;# 60 MB
167
168 %end