~vcs-imports/soas/trunk

« back to all changes in this revision

Viewing changes to fedora-mini-base.ks

  • Committer: Sebastian Dziallas
  • Date: 2010-03-20 01:28:04 UTC
  • Revision ID: git-v1:362fb30061fd52b4bedb65728ad10da8bf3ee9b9
major changes to kickstart file from last #sugar-meeting

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# fedora-mini-base.ks
2
 
#
3
 
# Defines the basics for all kickstarts in the fedora-mini branch
4
 
 
5
 
lang en_US.UTF-8
6
 
keyboard us
7
 
timezone US/Eastern
8
 
auth --useshadow --enablemd5
9
 
selinux --permissive
10
 
firewall --enabled --service=mdns
11
 
xconfig --startxonboot
12
 
part / --size 4096 --fstype ext4
13
 
services --enabled=NetworkManager,messagebus --disabled=network,sshd
14
 
 
15
 
# To compose against the current release tree, use the following "repo" (enabled by default)
16
 
repo --name=released --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-12&arch=i386
17
 
# To include updates, use the following "repo" (enabled by default)
18
 
repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f12&arch=i386
19
 
repo --name=updates-testing --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f12&arch=i386
20
 
 
21
 
# To compose against rawhide, use the following "repo" (disabled by default)
22
 
#repo --name=rawhide --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=i386
23
 
 
24
 
# To compose against local trees, (edit and) use:
25
 
#repo --name=f11 --baseurl=http://localrepo/fedora/releases/11/Everything/$basearch/os/
26
 
#repo --name=f11-updates --baseurl=http://localrepo/fedora/updates/11/$basearch/
27
 
#repo --name=fedora-mini --baseurl=http://localhost/
28
 
 
29
 
%packages
30
 
@base-x
31
 
@base
32
 
@core
33
 
@hardware-support
34
 
@fonts
35
 
@input-methods
36
 
kernel
37
 
memtest86+
38
 
 
39
 
# Remove default base packages we don't want
40
 
-ccid
41
 
-coolkey
42
 
-device-mapper-multipath
43
 
-dos2unix
44
 
-dump
45
 
-finger
46
 
-fprintd-pam
47
 
-hunspell
48
 
-irda-utils
49
 
-jwhois
50
 
-lftp
51
 
-mcelog
52
 
-mlocate
53
 
-nano
54
 
-nc
55
 
-nfs-utils
56
 
-nss_db
57
 
-nss_ldap
58
 
-numactl
59
 
-pcmciautils
60
 
-perf
61
 
-pm-utils
62
 
-prctl
63
 
-rdate
64
 
-rdist
65
 
-rsh
66
 
-rsync
67
 
-sendmail
68
 
-sos
69
 
-specspo
70
 
-stunnel
71
 
-system-config-firewall-tui
72
 
-system-config-network-tui
73
 
-talk
74
 
-time
75
 
-tree
76
 
-unix2dos
77
 
-words
78
 
-ypbind
79
 
 
80
 
# Remove default base-x packages we don't want
81
 
-bitmap-fonts
82
 
-cups-pk-helper
83
 
-glx-utils
84
 
-system-config-date
85
 
-system-config-firewall
86
 
-system-config-network
87
 
-system-config-printer
88
 
-system-config-services
89
 
-system-config-users
90
 
 
91
 
# Remove default core packages we don't want
92
 
-ppc64-utils
93
 
-s390utils
94
 
-sendmail
95
 
-silo
96
 
-yaboot
97
 
 
98
 
# Remove default unwanted hardware firmware and support we don't want
99
 
-b43-fwcutter
100
 
-foo2hiperc
101
 
-foo2hp
102
 
-foo2lava
103
 
-foo2qpdl
104
 
-foo2slx
105
 
-foo2xqx
106
 
-foo2zjs
107
 
-ivtv-firmware
108
 
-printer-filters
109
 
-ql2100-firmware
110
 
-ql2200-firmware
111
 
-ql23xx-firmware
112
 
-ql2400-firmware
113
 
-ql2500-firmware
114
 
# These are listed somewhere other than hardware support!
115
 
-irda-utils
116
 
-fprintd*
117
 
 
118
 
# Remove unwanted default fonts we don't want
119
 
-abyssinica-fonts
120
 
-cjkuni-uming-fonts
121
 
-jomolhari-fonts
122
 
-kacst*
123
 
-khmeros-base-fonts
124
 
-lklug-fonts
125
 
-lohit*
126
 
-padauk-fonts
127
 
-paktype*
128
 
-smc-meera-fonts
129
 
-stix-fonts
130
 
-thai-scalable-waree-fonts
131
 
-un-core-dotum-fonts
132
 
-vlgothic-fonts
133
 
 
134
 
# Remove default input-methods we don't want
135
 
-ibus*
136
 
-m17n*
137
 
 
138
 
# dictionaries are big
139
 
-aspell-*
140
 
-hunspell-*
141
 
-man-pages*
142
 
-words
143
 
 
144
 
# livecd bits to set up the livecd and be able to install
145
 
anaconda
146
 
 
147
 
# Add some useful utils
148
 
system-config-firewall-base
149
 
gnome-packagekit
150
 
powertop
151
 
gnupg2
152
 
yum-presto
153
 
# Add this so we don't pull in sendmail/exim
154
 
ssmtp
155
 
 
156
 
%end
157
 
 
158
 
%post
159
 
# FIXME: it'd be better to get this installed from a package
160
 
cat > /etc/rc.d/init.d/livesys << EOF
161
 
#!/bin/bash
162
 
#
163
 
# live: Init script for live image
164
 
#
165
 
# chkconfig: 345 00 99
166
 
# description: Init script for live image.
167
 
 
168
 
. /etc/init.d/functions
169
 
 
170
 
if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ]; then
171
 
    exit 0
172
 
fi
173
 
 
174
 
if [ -e /.liveimg-configured ] ; then
175
 
    configdone=1
176
 
fi
177
 
 
178
 
exists() {
179
 
    which \$1 >/dev/null 2>&1 || return
180
 
    \$*
181
 
}
182
 
 
183
 
touch /.liveimg-configured
184
 
 
185
 
# mount live image
186
 
if [ -b \`readlink -f /dev/live\` ]; then
187
 
   mkdir -p /mnt/live
188
 
   mount -o ro /dev/live /mnt/live 2>/dev/null || mount /dev/live /mnt/live
189
 
fi
190
 
 
191
 
livedir="LiveOS"
192
 
for arg in \`cat /proc/cmdline\` ; do
193
 
  if [ "\${arg##live_dir=}" != "\${arg}" ]; then
194
 
    livedir=\${arg##live_dir=}
195
 
    return
196
 
  fi
197
 
done
198
 
 
199
 
# enable swaps unless requested otherwise
200
 
swaps=\`blkid -t TYPE=swap -o device\`
201
 
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -n "\$swaps" ] ; then
202
 
  for s in \$swaps ; do
203
 
    action "Enabling swap partition \$s" swapon \$s
204
 
  done
205
 
fi
206
 
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -f /mnt/live/\${livedir}/swap.img ] ; then
207
 
  action "Enabling swap file" swapon /mnt/live/\${livedir}/swap.img
208
 
fi
209
 
 
210
 
mountPersistentHome() {
211
 
  # support label/uuid
212
 
  if [ "\${homedev##LABEL=}" != "\${homedev}" -o "\${homedev##UUID=}" != "\${homedev}" ]; then
213
 
    homedev=\`/sbin/blkid -o device -t "\$homedev"\`
214
 
  fi
215
 
 
216
 
  # if we're given a file rather than a blockdev, loopback it
217
 
  if [ "\${homedev##mtd}" != "\${homedev}" ]; then
218
 
    # mtd devs don't have a block device but get magic-mounted with -t jffs2
219
 
    mountopts="-t jffs2"
220
 
  elif [ ! -b "\$homedev" ]; then
221
 
    loopdev=\`losetup -f\`
222
 
    if [ "\${homedev##/mnt/live}" != "\${homedev}" ]; then
223
 
      action "Remounting live store r/w" mount -o remount,rw /mnt/live
224
 
    fi
225
 
    losetup \$loopdev \$homedev
226
 
    homedev=\$loopdev
227
 
  fi
228
 
 
229
 
  # if it's encrypted, we need to unlock it
230
 
  if [ "\$(/sbin/blkid -s TYPE -o value \$homedev 2>/dev/null)" = "crypto_LUKS" ]; then
231
 
    echo
232
 
    echo "Setting up encrypted /home device"
233
 
    plymouth ask-for-password --command="cryptsetup luksOpen \$homedev EncHome"
234
 
    homedev=/dev/mapper/EncHome
235
 
  fi
236
 
 
237
 
  # and finally do the mount
238
 
  mount \$mountopts \$homedev /home
239
 
  # if we have /home under what's passed for persistent home, then
240
 
  # we should make that the real /home.  useful for mtd device on olpc
241
 
  if [ -d /home/home ]; then mount --bind /home/home /home ; fi
242
 
  [ -x /sbin/restorecon ] && /sbin/restorecon /home
243
 
  if [ -d /home/liveuser ]; then USERADDARGS="-M" ; fi
244
 
}
245
 
 
246
 
findPersistentHome() {
247
 
  for arg in \`cat /proc/cmdline\` ; do
248
 
    if [ "\${arg##persistenthome=}" != "\${arg}" ]; then
249
 
      homedev=\${arg##persistenthome=}
250
 
      return
251
 
    fi
252
 
  done
253
 
}
254
 
 
255
 
if strstr "\`cat /proc/cmdline\`" persistenthome= ; then
256
 
  findPersistentHome
257
 
elif [ -e /mnt/live/\${livedir}/home.img ]; then
258
 
  homedev=/mnt/live/\${livedir}/home.img
259
 
fi
260
 
 
261
 
# if we have a persistent /home, then we want to go ahead and mount it
262
 
if ! strstr "\`cat /proc/cmdline\`" nopersistenthome && [ -n "\$homedev" ] ; then
263
 
  action "Mounting persistent /home" mountPersistentHome
264
 
fi
265
 
 
266
 
# make it so that we don't do writing to the overlay for things which
267
 
# are just tmpdirs/caches
268
 
mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum
269
 
mount -t tmpfs tmp /tmp
270
 
mount -t tmpfs vartmp /var/tmp
271
 
[ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /tmp /var/tmp >/dev/null 2>&1
272
 
 
273
 
if [ -n "\$configdone" ]; then
274
 
  exit 0
275
 
fi
276
 
 
277
 
# add fedora user with no passwd
278
 
action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser
279
 
passwd -d liveuser > /dev/null
280
 
 
281
 
# turn off firstboot for livecd boots
282
 
chkconfig --level 345 firstboot off 2>/dev/null
283
 
 
284
 
# don't start yum-updatesd for livecd boots
285
 
chkconfig --level 345 yum-updatesd off 2>/dev/null
286
 
 
287
 
# turn off mdmonitor by default
288
 
chkconfig --level 345 mdmonitor off 2>/dev/null
289
 
 
290
 
# turn off setroubleshoot on the live image to preserve resources
291
 
chkconfig --level 345 setroubleshoot off 2>/dev/null
292
 
 
293
 
# don't do packagekit checking by default
294
 
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/frequency_get_updates never >/dev/null
295
 
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/frequency_get_upgrades never >/dev/null
296
 
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/frequency_refresh_cache never >/dev/null
297
 
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/notify_available false >/dev/null
298
 
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/notify_distro_upgrades false >/dev/null
299
 
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_firmware false >/dev/null
300
 
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_hardware false >/dev/null
301
 
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_codec_helper false >/dev/null
302
 
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_font_helper false >/dev/null
303
 
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_mime_type_helper false >/dev/null
304
 
 
305
 
 
306
 
# don't start cron/at as they tend to spawn things which are
307
 
# disk intensive that are painful on a live image
308
 
chkconfig --level 345 crond off 2>/dev/null
309
 
chkconfig --level 345 atd off 2>/dev/null
310
 
chkconfig --level 345 readahead_early off 2>/dev/null
311
 
chkconfig --level 345 readahead_later off 2>/dev/null
312
 
 
313
 
# Stopgap fix for RH #217966; should be fixed in HAL instead
314
 
touch /media/.hal-mtab
315
 
 
316
 
# workaround clock syncing on shutdown that we don't want (#297421)
317
 
sed -i -e 's/hwclock/no-such-hwclock/g' /etc/rc.d/init.d/halt
318
 
 
319
 
# and hack so that we eject the cd on shutdown if we're using a CD...
320
 
if strstr "\`cat /proc/cmdline\`" CDLABEL= ; then
321
 
  cat >> /sbin/halt.local << FOE
322
 
#!/bin/bash
323
 
# we want to eject the cd on halt, but let's also try to avoid
324
 
# io errors due to not being able to get files...
325
 
cat /sbin/halt > /dev/null
326
 
cat /sbin/reboot > /dev/null
327
 
/usr/sbin/eject -p -m \$(readlink -f /dev/live) >/dev/null 2>&1
328
 
echo "Please remove the CD from your drive and press Enter to finish restarting"
329
 
read -t 30 < /dev/console
330
 
FOE
331
 
chmod +x /sbin/halt.local
332
 
fi
333
 
 
334
 
EOF
335
 
 
336
 
# bah, hal starts way too late
337
 
cat > /etc/rc.d/init.d/livesys-late << EOF
338
 
#!/bin/bash
339
 
#
340
 
# live: Late init script for live image
341
 
#
342
 
# chkconfig: 345 99 01
343
 
# description: Late init script for live image.
344
 
 
345
 
. /etc/init.d/functions
346
 
 
347
 
if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then
348
 
    exit 0
349
 
fi
350
 
 
351
 
exists() {
352
 
    which \$1 >/dev/null 2>&1 || return
353
 
    \$*
354
 
}
355
 
 
356
 
touch /.liveimg-late-configured
357
 
 
358
 
# read some variables out of /proc/cmdline
359
 
for o in \`cat /proc/cmdline\` ; do
360
 
    case \$o in
361
 
    ks=*)
362
 
        ks="\${o#ks=}"
363
 
        ;;
364
 
    xdriver=*)
365
 
        xdriver="--set-driver=\${o#xdriver=}"
366
 
        ;;
367
 
    esac
368
 
done
369
 
 
370
 
# if liveinst or textinst is given, start anaconda
371
 
if strstr "\`cat /proc/cmdline\`" liveinst ; then
372
 
   plymouth --quit
373
 
   /usr/sbin/liveinst \$ks
374
 
fi
375
 
if strstr "\`cat /proc/cmdline\`" textinst ; then
376
 
   plymouth --quit
377
 
   /usr/sbin/liveinst --text \$ks
378
 
fi
379
 
 
380
 
# configure X, allowing user to override xdriver
381
 
if [ -n "\$xdriver" ]; then
382
 
   exists system-config-display --noui --reconfig --set-depth=24 \$xdriver
383
 
fi
384
 
 
385
 
EOF
386
 
 
387
 
chmod 755 /etc/rc.d/init.d/livesys
388
 
/sbin/restorecon /etc/rc.d/init.d/livesys
389
 
/sbin/chkconfig --add livesys
390
 
 
391
 
chmod 755 /etc/rc.d/init.d/livesys-late
392
 
/sbin/restorecon /etc/rc.d/init.d/livesys-late
393
 
/sbin/chkconfig --add livesys-late
394
 
 
395
 
# work around for poor key import UI in PackageKit
396
 
rm -f /var/lib/rpm/__db*
397
 
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
398
 
 
399
 
# go ahead and pre-make the man -k cache (#455968)
400
 
/usr/sbin/makewhatis -w
401
 
 
402
 
# save a little bit of space at least...
403
 
rm -f /boot/initrd*
404
 
# make sure there aren't core files lying around
405
 
rm -f /core*
406
 
 
407
 
%end
408
 
 
409
 
 
410
 
%post
411
 
cp $INSTALL_ROOT/usr/share/doc/*-release-*/GPL $LIVE_ROOT/GPL
412
 
cp $INSTALL_ROOT/usr/share/doc/HTML/readme-live-image/en_US/readme-live-image-en_US.txt $LIVE_ROOT/README
413
 
 
414
 
# only works on x86, x86_64
415
 
if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then
416
 
  if [ ! -d $LIVE_ROOT/LiveOS ]; then mkdir -p $LIVE_ROOT/LiveOS ; fi
417
 
  cp /usr/bin/livecd-iso-to-disk $LIVE_ROOT/LiveOS
418
 
fi
419
 
%end