Add .gitignore file for git.
[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 # This should enable the serial console.  However it requires
29 # livecd-tools 018 or above (is ignored on earlier versions).
30 bootloader --append="console=tty0 console=ttyS0,9600n8"
31
32 # Basic Fedora repository and updates.
33 repo --name=released --baseurl=@CD_BASE_URL@
34 repo --name=updates --baseurl=@CD_UPDATES_URL@
35 #repo --name=released --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-@CD_BASE@&arch=@CD_ARCH@
36
37 # A local repository if selected by ./configure --enable-localrepo=...
38 @LOCALREPO@
39
40 # The p2vrepo subdirectory, containing virt-p2v RPM.
41 repo --name=p2v --baseurl=file://@abs_top_builddir@/p2vrepo
42
43 %packages --excludedocs
44 bash
45 kernel
46 syslinux
47 passwd
48 policycoreutils
49 chkconfig
50 authconfig
51 rootfiles
52
53 # For unicode console support.
54 kbd
55
56 # dd, sleep, sync, etc.
57 coreutils
58
59 # For device mapping
60 device-mapper
61 util-linux-ng
62 module-init-tools
63 gzip
64 kpartx
65
66 # For remote communications
67 openssh-clients
68 nc
69
70 # For the shell script
71 grep
72 sed
73 gawk
74 findutils
75
76 # For IP configuration
77 iproute
78 net-tools
79
80 # For network configuration
81 dhclient
82
83 # Some other generally useful packages
84 which
85 perl
86 rpm
87 lsof
88 strace
89 vim-minimal
90 vim-enhanced
91 bind-utils
92 file
93
94 # virt-p2v package and its deps
95 ocaml
96 ocaml-findlib
97 ocaml-pcre
98 ocaml-extlib
99 ocaml-xml-light
100 ocaml-libvirt
101 ocaml-newt
102 ocaml-gettext
103 virt-p2v
104
105
106 %post --nochroot
107
108 # These files have to be copied from the build directory into the
109 # squashfs.  See also:
110 # http://www.mail-archive.com/fedora-livecd-list@redhat.com/msg01470.html
111
112 # Just check everything exists, because kickstart will not give
113 # an error if files or paths are missing.
114 if test "x$INSTALL_ROOT" = "x"; then ERROR=1; fi
115 if ! test -d "$INSTALL_ROOT/usr/bin"; then ERROR=1; fi
116 if ! test -d "@abs_top_srcdir@"; then ERROR=1; fi
117 if ! test -d "@abs_top_srcdir@/extras"; then ERROR=1; fi
118
119 if test "x$ERROR" = "x1"; then
120     echo "**************************************************"
121     echo "**************************************************"
122     echo "**************************************************"
123     echo "Missing files or directories found.  This ISO will be bad."
124     echo "**************************************************"
125     echo "**************************************************"
126     echo "**************************************************"
127     # Exit 1 won't stop anything, but it makes me feel better.
128     exit 1
129 fi
130
131 cp -a $INSTALL_ROOT/etc/lvm $INSTALL_ROOT/etc/lvm.new
132 install -m 0644 -o root -g root @abs_top_srcdir@/lvm.conf \
133         $INSTALL_ROOT/etc/lvm.new
134
135 # Overwrite /etc/event.d/tty1 (normally from initscripts).
136 install -m 0644 -o root -g root @abs_top_srcdir@/tty1 $INSTALL_ROOT/etc/event.d/
137
138 # Also /etc/inittab (from initscripts).
139 install -m 0644 -o root -g root @abs_top_srcdir@/inittab $INSTALL_ROOT/etc/
140
141 # Copy everything under extras to the squashfs /extras.
142 cp -a @abs_top_srcdir@/extras $INSTALL_ROOT/extras
143
144 %end
145
146 %post
147
148 # Restore SELinux permissions on installed binaries.
149 /sbin/restorecon /usr/bin/virt-p2v
150 /sbin/restorecon /usr/bin/virt-p2v-update-wrapper
151 /sbin/restorecon /usr/bin/iso-attach
152
153 # Turn off firstboot for livecd boots.
154 echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
155
156 # Don't start yum-updatesd for livecd boots.
157 /sbin/chkconfig --level 345 yum-updatesd off
158
159 # Don't start cron/at as they tend to spawn things which are
160 # disk intensive that are painful on a live image.
161 /sbin/chkconfig --level 345 crond off
162 /sbin/chkconfig --level 345 atd off
163 /sbin/chkconfig --level 345 anacron off
164 /sbin/chkconfig --level 345 readahead_early off
165 /sbin/chkconfig --level 345 readahead_later off
166
167 # Stopgap fix for RH #217966; should be fixed in HAL instead
168 touch /media/.hal-mtab
169
170 # Make some mountpoints.
171 mkdir /mnt/root
172
173 # Remove some unused files.
174 rm -rf /usr/share/man           ;# 20 MB
175 #rm -rf /usr/share/doc          ;# 44 MB
176 #rm -rf /usr/share/locale       ;# 60 MB
177
178 %end