Subversion Repositories livecd

Rev

Rev 270 | Rev 274 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
269 beyerleu 1
########################################################################
2
#
3
#  LiveCD post install 
4
#
5
########################################################################
6
 
7
%post
8
 
9
########################################################################
10
# LiveCD configuration file and LiveCD functions
11
########################################################################
12
 
13
cat > /etc/livesys.conf << 'EOF_livesysconf'
14
###--------------------------------------------------------------------
15
### Configuration file for LiveCD
16
###--------------------------------------------------------------------
17
 
273 beyerleu 18
# default LiveCD user
269 beyerleu 19
LIVECD_DEF_USER="sluser"
20
 
21
# delay in sec. before auto login
22
LOGIN_DELAY=15
23
 
273 beyerleu 24
# Services which are off (not running) on the LiveCD
25
SERVICES_OFF="mdmonitor setroubleshoot auditd crond atd readahead_early \
26
              readahead_later kdump microcode_ctl openct pcscd postfix"
27
 
269 beyerleu 28
EOF_livesysconf
29
 
30
 
270 beyerleu 31
cat > /etc/init.d/livesys.functions << 'EOF_livesysfunctions'
269 beyerleu 32
###--------------------------------------------------------------------
33
### livesys functions
34
###--------------------------------------------------------------------
35
 
36
# egrep_o is a replacement for "egrep -o". It prints only the last matching text
37
egrep_o() {
38
   cat | egrep "$1" | sed -r "s/.*($1).*/\\1/"
39
}
40
 
41
# boot parameter
42
cmdline_parameter() {
43
   CMDLINE=/proc/cmdline
44
   cat "$CMDLINE" | egrep_o "(^|[[:space:]]+)$1(\$|=|[[:space:]]+)" | egrep_o "$1"
45
}
46
 
47
# boot parameter value
48
cmdline_value()
49
{
50
   CMDLINE=/proc/cmdline
51
   cat "$CMDLINE" | egrep_o "(^|[[:space:]]+)$1=([^[:space:]]+)" | egrep_o "=.*" | cut -b 2- | tail -n 1
52
}
53
 
54
exists() {
55
    which $1 >/dev/null 2>&1 || return
56
    $*
57
}
58
 
59
EOF_livesysfunctions
60
 
61
 
62
 
63
########################################################################
64
# Create a sub-script so the output can be captured
65
# Must change "$" to "\$" and "`" to "\`" to avoid shell quoting
66
########################################################################
67
 
68
cat > /root/post-install << EOF_post
69
#!/bin/bash
70
 
71
 
72
echo ###################################################################
73
echo ## Creating the livesys init script - livesys
74
echo ###################################################################
75
 
76
cat > /etc/rc.d/init.d/livesys << EOF_initscript
77
#!/bin/bash
78
#
79
# live: Init script for live image
80
#
81
# chkconfig: 345 00 99
82
# description: Init script for live image.
83
 
84
. /etc/init.d/functions
85
. /etc/livesys.conf
86
. /etc/init.d/livesys.functions
87
 
88
if ! strstr "\\\`cat /proc/cmdline\\\`" liveimg || [ "\\\$1" != "start" ]; then
89
    exit 0
90
fi
91
 
92
if [ -e /.liveimg-configured ] ; then
93
    configdone=1
94
fi
95
 
96
touch /.liveimg-configured
97
 
98
# read boot parameters out of /proc/cmdline
273 beyerleu 99
hostname=\\\$( cmdline_value hostname )
100
CELL=\\\$( cmdline_value cell )
101
SERVICEON=\\\$( cmdline_value serviceon )
102
SERVICEOFF=\\\$( cmdline_value serviceoff )
269 beyerleu 103
 
104
# set livecd user
105
LIVECD_USER=\\\$( cmdline_value user )
106
[ ! "\\\$LIVECD_USER" ] && LIVECD_USER=\\\$LIVECD_DEF_USER
107
 
108
# mount live image
109
if [ -b \\\`readlink -f /dev/live\\\` ]; then
110
   mkdir -p /mnt/live
111
   mount -o ro /dev/live /mnt/live 2>/dev/null || mount /dev/live /mnt/live
112
fi
113
 
114
livedir="LiveOS"
115
for arg in \\\`cat /proc/cmdline\\\` ; do
116
  if [ "\\\${arg##live_dir=}" != "\\\${arg}" ]; then
117
    livedir=\\\${arg##live_dir=}
118
    return
119
  fi
120
done
121
 
122
# enable swaps unless requested otherwise
123
swaps=\\\`blkid -t TYPE=swap -o device\\\`
124
if ! strstr "\\\`cat /proc/cmdline\\\`" noswap && [ -n "\\\$swaps" ] ; then
125
  for s in \\\$swaps ; do
126
    action "Enabling swap partition \\\$s" swapon \\\$s
127
  done
128
fi
129
if ! strstr "\\\`cat /proc/cmdline\\\`" noswap && [ -f /mnt/live/\\\${livedir}/swap.img ] ; then
130
  action "Enabling swap file" swapon /mnt/live/\\\${livedir}/swap.img
131
fi
132
 
133
mountPersistentHome() {
134
  # support label/uuid
135
  if [ "\\\${homedev##LABEL=}" != "\\\${homedev}" -o "\\\${homedev##UUID=}" != "\\\${homedev}" ]; then
136
    homedev=\\\`/sbin/blkid -o device -t "\\\$homedev"\\\`
137
  fi
138
 
139
  # if we're given a file rather than a blockdev, loopback it
140
  if [ "\\\${homedev##mtd}" != "\\\${homedev}" ]; then
141
    # mtd devs don't have a block device but get magic-mounted with -t jffs2
142
    mountopts="-t jffs2"
143
  elif [ ! -b "\\\$homedev" ]; then
144
    loopdev=\\\`losetup -f\\\`
145
    if [ "\\\${homedev##/mnt/live}" != "\\\${homedev}" ]; then
146
      action "Remounting live store r/w" mount -o remount,rw /mnt/live
147
    fi
148
    losetup \\\$loopdev \\\$homedev
149
    homedev=\\\$loopdev
150
  fi
151
 
152
  # if it's encrypted, we need to unlock it
153
  if [ "\\\$(/sbin/blkid -s TYPE -o value \\\$homedev 2>/dev/null)" = "crypto_LUKS" ]; then
154
    echo
155
    echo "Setting up encrypted /home device"
156
    plymouth ask-for-password --command="cryptsetup luksOpen \\\$homedev EncHome"
157
    homedev=/dev/mapper/EncHome
158
  fi
159
 
160
  # and finally do the mount
161
  mount \\\$mountopts \\\$homedev /home
162
  # if we have /home under what's passed for persistent home, then
163
  # we should make that the real /home.  useful for mtd device on olpc
164
  if [ -d /home/home ]; then mount --bind /home/home /home ; fi
165
  [ -x /sbin/restorecon ] && /sbin/restorecon /home
166
  if [ -d /home/\\\$LIVECD_USER ]; then USERADDARGS="-M" ; fi
167
}
168
 
169
findPersistentHome() {
170
  for arg in \\\`cat /proc/cmdline\\\` ; do
171
    if [ "\\\${arg##persistenthome=}" != "\\\${arg}" ]; then
172
      homedev=\\\${arg##persistenthome=}
173
      return
174
    fi
175
  done
176
}
177
 
178
if strstr "\\\`cat /proc/cmdline\\\`" persistenthome= ; then
179
  findPersistentHome
180
elif [ -e /mnt/live/\\\${livedir}/home.img ]; then
181
  homedev=/mnt/live/\\\${livedir}/home.img
182
fi
183
 
184
# if we have a persistent /home, then we want to go ahead and mount it
185
if ! strstr "\\\`cat /proc/cmdline\\\`" nopersistenthome && [ -n "\\\$homedev" ] ; then
186
  action "Mounting persistent /home" mountPersistentHome
187
fi
188
 
189
# make it so that we don't do writing to the overlay for things which
190
# are just tmpdirs/caches
191
mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum
192
mount -t tmpfs tmp /tmp
193
mount -t tmpfs vartmp /var/tmp
194
[ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /tmp /var/tmp >/dev/null 2>&1
195
 
273 beyerleu 196
# turn off services, which are not useful on LiveCD, to preserve resources
197
if [ "\\\$SERVICE_OFF" ]; then
198
    for service in \\\$SERVICE_OFF ; do
199
        [ -f /etc/init.d/\\\$service ] && chkconfig \\\$service off 2>/dev/null
200
    done
201
fi
202
 
203
# services off, from command line paramter
204
if [ "\\\$SERVICEOFF" ]; then
205
    for service in \\\$( echo "\\\$SERVICEOFF" | tr ':' ' ' ); do
206
        [ -f /etc/init.d/\\\$service ] && chkconfig \\\$service off 2>/dev/null
207
    done
208
fi
209
 
210
# services on, from command line paramter
211
if [ "\\\$SERVICEON" ]; then
212
    for service in \\\$( echo "\\\$SERVICEON" | tr ':' ' ' ); do
213
        [ -f /etc/init.d/\\\$service ] && chkconfig \\\$service on  2>/dev/null
214
    done
215
fi
216
 
217
# set afs cell if given by boot parameter
218
[ "\\\$CELL" ] && echo \\\$CELL > /usr/vice/etc/ThisCell
219
 
220
# set the LiveCD hostname
221
[ ! "\\\$hostname" ] && hostname="livecd.localdomain"
222
sed -i -e "s|HOSTNAME=.*|HOSTNAME=\\\$hostname|g" /etc/sysconfig/network
223
/bin/hostname \\\$hostname
224
 
225
 
226
###################################################
227
# EXIT here if LiveCD has already been configured #
228
###################################################
269 beyerleu 229
if [ -n "\\\$configdone" ]; then
230
  exit 0
231
fi
232
 
233
## fix various bugs and issues
234
# unmute sound card
235
exists alsaunmute 0 2> /dev/null
236
 
270 beyerleu 237
# turn off firstboot for livecd boots
238
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
239
 
240
# start afs with option -memcache (is this correct?)
241
[ -e /etc/sysconfig/afs ] && sed -i "s|^OPTIONS=.*|OPTIONS=\"-memcache\"|" /etc/sysconfig/afs
242
 
269 beyerleu 243
# Stopgap fix for RH #217966; should be fixed in HAL instead
244
touch /media/.hal-mtab
245
 
246
## create the LiveCD default user
247
# add default user with no password
248
/usr/sbin/useradd -c "LiveCD default user" \\\$LIVECD_USER
249
/usr/bin/passwd -d \\\$LIVECD_USER > /dev/null
250
# give default user sudo privileges
251
echo "\\\$LIVECD_USER     ALL=(ALL)     NOPASSWD: ALL" >> /etc/sudoers
252
 
253
## configure default user's desktop
254
# set up timed auto-login at 10 seconds
255
cat >> /etc/gdm/custom.conf << FOE
256
[daemon]
257
TimedLoginEnable=true
258
TimedLogin=LIVECD_USER
259
TimedLoginDelay=$LOGIN_DELAY
260
FOE
261
sed -i "s|LIVECD_USER|\\\$LIVECD_USER|" /etc/gdm/custom.conf
262
 
263
# add keyboard and display configuration utilities to the desktop
264
mkdir -p /home/\\\$LIVECD_USER/Desktop >/dev/null
265
cp /usr/share/applications/gnome-keyboard.desktop           /home/\\\$LIVECD_USER/Desktop/
266
cp /usr/share/applications/gnome-display-properties.desktop /home/\\\$LIVECD_USER/Desktop/
267
 
268
# disable screensaver locking
269
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool   /apps/gnome-screensaver/lock_enabled "false" >/dev/null
270
 
271
# disable PackageKit update checking by default
272
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t int /apps/gnome-packagekit/update-icon/frequency_get_updates "0" >/dev/null
273
 
274
# detecting disk partitions and logical volumes 
275
CreateDesktopIconHD()
276
{
277
cat > /home/\\\$LIVECD_USER/Desktop/Local\ hard\ drives.desktop << EOF_HDicon
278
[Desktop Entry]
279
Encoding=UTF-8
280
Version=1.0
281
Type=Link
282
Name=Local hard drives
283
Name[en_US]=Local hard drives
284
Name[fr_CA]=Disques durs locaux
285
URL=/mnt/disc
286
Icon=/usr/share/icons/gnome/32x32/devices/gnome-dev-harddisk.png
287
EOF_HDicon
288
 
289
chmod 755 /home/\\\$LIVECD_USER/Desktop/Local\ hard\ drives.desktop
290
}
291
 
292
CreateDesktopIconLVM()
293
{
294
mkdir -p /home/\\\$LIVECD_USER/Desktop >/dev/null
295
 
296
cat > /home/\\\$LIVECD_USER/Desktop/Local\ logical\ volumes.desktop << EOF_LVMicon
297
[Desktop Entry]
298
Encoding=UTF-8
299
Version=1.0
300
Type=Link
301
Name=Local logical volumes
302
Name[en_US]=Local logical volumes
303
Name[fr_CA]=Volumes logiques locaux
304
URL=/mnt/lvm
305
Icon=/usr/share/icons/gnome/32x32/devices/gnome-dev-harddisk.png
306
EOF_LVMicon
307
 
308
chmod 755 /home/\\\$LIVECD_USER/Desktop/Local\ logical\ volumes.desktop
309
}
310
 
311
# don't mount disk partitions if 'nodiskmount' is given as a boot option
312
if ! strstr "\\\`cat /proc/cmdline\\\`" nodiskmount ; then
313
	MOUNTOPTION="ro"
314
	HARD_DISKS=\\\`egrep "[sh]d.\\\$" /proc/partitions | tr -s ' ' | sed 's/^  *//' | cut -d' ' -f4\\\`
315
 
316
	echo "Mounting hard disk partitions... "
317
	for DISK in \\\$HARD_DISKS; do
318
	    # Get the device and system info from fdisk (but only for fat and linux partitions).
319
	    FDISK_INFO=\\\`fdisk -l /dev/\\\$DISK | tr [A-Z] [a-z] | egrep "fat|linux" | egrep -v "swap|extended|lvm" | sed 's/*//' | tr -s ' ' | tr ' ' ':' | cut -d':' -f1,6-\\\`
320
	    for FDISK_ENTRY in \\\$FDISK_INFO; do
321
		PARTITION=\\\`echo \\\$FDISK_ENTRY | cut -d':' -f1\\\`
322
		MOUNTPOINT="/mnt/disc/\\\${PARTITION##/dev/}"
323
		mkdir -p \\\$MOUNTPOINT
324
		MOUNTED=FALSE
325
 
326
		# get the partition type
327
		case \\\`echo \\\$FDISK_ENTRY | cut -d':' -f2-\\\` in
328
		*fat*) 
329
		    FSTYPES="vfat"
330
		    EXTRAOPTIONS=",uid=500";;
331
		*)
332
		    FSTYPES="ext4 ext3 ext2"
333
		    EXTRAOPTIONS="";;
334
		esac
335
 
336
		# try to mount the partition
337
		for FSTYPE in \\\$FSTYPES; do
338
		    if mount -o "\\\${MOUNTOPTION}\\\${EXTRAOPTIONS}" -t \\\$FSTYPE \\\$PARTITION \\\$MOUNTPOINT &>/dev/null; then
339
			echo "\\\$PARTITION \\\$MOUNTPOINT \\\$FSTYPE noauto,\\\${MOUNTOPTION}\\\${EXTRAOPTIONS} 0 0" >> /etc/fstab
340
			echo -n "\\\$PARTITION "
341
			MOUNTED=TRUE
342
			CreateDesktopIconHD
343
		    fi
344
		done
345
		[ \\\$MOUNTED = "FALSE" ] && rmdir \\\$MOUNTPOINT
346
	    done
347
	done
348
	echo
349
fi
350
 
351
# don't mount logical volumes if 'nolvmmount' is given as a boot option
352
if ! strstr "\\\`cat /proc/cmdline\\\`" nolvmmount ; then
353
        MOUNTOPTION="ro"
354
	FSTYPES="ext4 ext3 ext2"
355
	echo "Scanning for logical volumes..."
356
	if ! lvm vgscan 2>&1 | grep "No volume groups"; then
357
	    echo "Activating logical volumes ..."
358
	    modprobe dm_mod >/dev/null
359
	    lvm vgchange -ay
360
	    LOGICAL_VOLUMES=\\\`lvm lvdisplay -c | sed "s/^  *//" | cut -d: -f1\\\`
361
	    if [ ! -z "\\\$LOGICAL_VOLUMES" ]; then
362
		echo "Making device nodes ..."
363
		lvm vgmknodes
364
		echo -n "Mounting logical volumes ... "
365
		for VOLUME_NAME in \\\$LOGICAL_VOLUMES; do
366
		    VG_NAME=\\\`echo \\\$VOLUME_NAME | cut -d/ -f3\\\`
367
		    LV_NAME=\\\`echo \\\$VOLUME_NAME | cut -d/ -f4\\\`
368
		    MOUNTPOINT="/mnt/lvm/\\\${VG_NAME}-\\\${LV_NAME}"
369
		    mkdir -p \\\$MOUNTPOINT
370
 
371
		    MOUNTED=FALSE
372
		    for FSTYPE in \\\$FSTYPES; do
373
			if mount -o \\\$MOUNTOPTION -t \\\$FSTYPE \\\$VOLUME_NAME \\\$MOUNTPOINT &>/dev/null; then
374
			    echo "\\\$VOLUME_NAME \\\$MOUNTPOINT \\\$FSTYPE defaults,\\\${MOUNTOPTION} 0 0" >> /etc/fstab
375
			    echo -n "\\\$VOLUME_NAME "
376
			    MOUNTED=TRUE
377
			    CreateDesktopIconLVM
378
			    break
379
			fi
380
		    done
381
		    [ \\\$MOUNTED = FALSE ] && rmdir \\\$MOUNTPOINT
382
		done
383
		echo
384
 
385
	    else
386
		echo "No logical volumes found"
387
	    fi
388
	fi
389
fi
390
 
391
# give back ownership to the default user
392
chown -R \\\$LIVECD_USER:\\\$LIVECD_USER /home/\\\$LIVECD_USER
393
 
394
EOF_initscript
395
echo ###################################################################
396
echo ## End of livesys script
397
echo ###################################################################
398
 
399
 
400
 
401
echo ###################################################################
402
echo ## Creating the livesys init script - livesys-late
403
echo ###################################################################
404
 
405
cat > /etc/rc.d/init.d/livesys-late << EOF_lateinitscript
406
#!/bin/bash
407
#
408
# live: Late init script for live image
409
#
410
# chkconfig: 345 99 01
411
# description: Late init script for live image.
412
 
413
. /etc/init.d/functions
414
. /etc/livesys.conf
415
. /etc/init.d/livesys.functions
416
 
417
if ! strstr "\\\`cat /proc/cmdline\\\`" liveimg || [ "\\\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then
418
    exit 0
419
fi
420
 
421
touch /.liveimg-late-configured
422
 
423
# read boot parameters out of /proc/cmdline
424
ks=\\\$( cmdline_value ks )
425
xdriver=\\\$( cmdline_value xdriver )
426
kb=\\\$( cmdline_value kb )
427
 
428
# if liveinst or textinst is given, start anaconda
429
if [ "\\\$( cmdline_parameter liveinst )" ]; then
430
   plymouth --quit
431
   /usr/sbin/liveinst \\\$ks
432
fi
433
if [ "\\\$( cmdline_parameter textinst )" ] ; then
434
   plymouth --quit
435
   /usr/sbin/liveinst --text \\\$ks
436
fi
437
 
438
# configure X, allowing user to override xdriver
439
if [ "\\\$xdriver" ]; then
440
    exists system-config-display --noui --reconfig --set-depth=24 --set-driver=\\\$xdriver
441
fi
442
 
443
# configure keyboard
444
if [ "\\\$kb" ]; then
445
    exists system-config-keyboard --noui \\\$kb 
446
fi
447
 
448
EOF_lateinitscript
449
echo ###################################################################
450
echo ## End of livesys-late script
451
echo ###################################################################
452
 
453
 
454
 
455
echo ###################################################################
456
echo ## Configure the LiveCD
457
echo ###################################################################
458
 
459
# workaround avahi segfault (#279301)
460
touch /etc/resolv.conf
461
/sbin/restorecon /etc/resolv.conf
462
 
463
chmod 755 /etc/rc.d/init.d/livesys
464
/sbin/restorecon /etc/rc.d/init.d/livesys
465
/sbin/chkconfig --add livesys
466
 
467
chmod 755 /etc/rc.d/init.d/livesys-late
468
/sbin/restorecon /etc/rc.d/init.d/livesys-late
469
/sbin/chkconfig --add livesys-late
470
 
471
# go ahead and pre-make the man -k cache (#455968)
472
/usr/sbin/makewhatis -w
473
 
474
# save a little bit of space at least...
475
rm -f /var/lib/rpm/__db*
476
rm -f /boot/initrd*
477
rm -f /boot/initramfs*
478
# make sure there aren't core files lying around
479
rm -f /core*
480
 
481
# convince readahead not to collect
482
rm -f /.readahead_collect
483
touch /var/lib/readahead/early.sorted
484
 
485
# workaround clock syncing on shutdown that we don't want (#297421)
486
sed -i -e 's/hwclock/no-such-hwclock/g' /etc/rc.d/init.d/halt
487
 
488
# import RPM GPG keys
489
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
490
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
491
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-sl6
492
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-dawson
493
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-sl
494
 
495
# evolution is in the gnome launch panel (workaround to start thunderbird instead)
496
[ ! -e /usr/bin/evolution ] && ln -s /usr/bin/thunderbird /usr/bin/evolution
497
 
498
EOF_post
499
 
500
# run post-install script
501
/bin/bash -x /root/post-install 2>&1 | tee /root/post-install.log
502
 
503
%end
504
########################################################################
505
# End of configure LiveCD in chroot
506
########################################################################
507
 
508
 
509
 
510
%post --nochroot
511
########################################################################
512
# Post install in no chroot
513
# Must change "$" to "\$" and "`" to "\`" to avoid shell quoting
514
########################################################################
515
cat > /root/postnochroot-install << EOF_postnochroot
516
#!/bin/bash
517
 
518
# Copy licensing information
519
cp $INSTALL_ROOT/usr/share/doc/*-release-*/GPL $LIVE_ROOT/GPL
520
 
521
# add livecd-iso-to-disk utility on the LiveCD
522
# only works on x86, x86_64
523
if [ "\$(uname -i)" = "i386" -o "\$(uname -i)" = "x86_64" ]; then
524
  if [ ! -d \$LIVE_ROOT/LiveOS ]; then mkdir -p \$LIVE_ROOT/LiveOS ; fi
525
  cp /usr/bin/livecd-iso-to-disk \$LIVE_ROOT/LiveOS
526
fi
527
 
528
# customize boot menu entries
529
grep -B4 'menu default'  \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/default.txt
530
grep -B3 'xdriver=vesa'  \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/basicvideo.txt
531
grep -A3 'label check0'  \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/check.txt
532
grep -A2 'label memtest' \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/memtest.txt
533
grep -A2 'label local'   \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/localboot.txt
534
 
535
sed "s/label linux0/label linuxtext0/"   \$LIVE_ROOT/isolinux/default.txt > \$LIVE_ROOT/isolinux/textboot.txt
536
sed -i "s/Boot/Boot (Text Mode)/"                                           \$LIVE_ROOT/isolinux/textboot.txt
537
sed -i "s/liveimg/liveimg 3/"                                               \$LIVE_ROOT/isolinux/textboot.txt
538
sed -i "/menu default/d"                                                    \$LIVE_ROOT/isolinux/textboot.txt
539
 
540
sed "s/label linux0/label install0/"     \$LIVE_ROOT/isolinux/default.txt > \$LIVE_ROOT/isolinux/install.txt
541
sed -i "s/Boot/Install/"                                                    \$LIVE_ROOT/isolinux/install.txt
542
sed -i "s/liveimg/liveimg liveinst noswap nolvmmount/"                      \$LIVE_ROOT/isolinux/install.txt
543
sed -i "s/ quiet / /"                                                       \$LIVE_ROOT/isolinux/install.txt
544
sed -i "s/ rhgb / /"                                                        \$LIVE_ROOT/isolinux/install.txt
545
sed -i "/menu default/d"                                                    \$LIVE_ROOT/isolinux/install.txt
546
 
547
sed "s/label linux0/label textinstall0/" \$LIVE_ROOT/isolinux/default.txt > \$LIVE_ROOT/isolinux/textinstall.txt
548
sed -i "s/Boot/Install (Text Mode)/"                                        \$LIVE_ROOT/isolinux/textinstall.txt
549
sed -i "s/liveimg/liveimg textinst noswap nolvmmount/"                      \$LIVE_ROOT/isolinux/textinstall.txt
550
sed -i "s/ quiet / /"                                                       \$LIVE_ROOT/isolinux/textinstall.txt
551
sed -i "s/ rhgb / /"                                                        \$LIVE_ROOT/isolinux/textinstall.txt
552
sed -i "/menu default/d"                                                    \$LIVE_ROOT/isolinux/textinstall.txt
553
 
554
cat \$LIVE_ROOT/isolinux/default.txt \$LIVE_ROOT/isolinux/basicvideo.txt \$LIVE_ROOT/isolinux/check.txt \$LIVE_ROOT/isolinux/memtest.txt \$LIVE_ROOT/isolinux/localboot.txt > \$LIVE_ROOT/isolinux/current.txt
555
diff \$LIVE_ROOT/isolinux/isolinux.cfg \$LIVE_ROOT/isolinux/current.txt | sed '/^[0-9][0-9]*/d; s/^. //; /^---$/d' > \$LIVE_ROOT/isolinux/cleaned.txt
556
cat \$LIVE_ROOT/isolinux/cleaned.txt \$LIVE_ROOT/isolinux/default.txt \$LIVE_ROOT/isolinux/textboot.txt \$LIVE_ROOT/isolinux/basicvideo.txt \$LIVE_ROOT/isolinux/install.txt \$LIVE_ROOT/isolinux/textinstall.txt \$LIVE_ROOT/isolinux/memtest.txt \$LIVE_ROOT/isolinux/localboot.txt > \$LIVE_ROOT/isolinux/isolinux.cfg
557
rm -f \$LIVE_ROOT/isolinux/*.txt
558
 
559
EOF_postnochroot
560
 
561
# run postnochroot-install script
562
/bin/bash -x /root/postnochroot-install 2>&1 | tee /root/postnochroot-install.log
563
 
564
%end
565
########################################################################
566
# End of configure LiveCD in nochroot
567
########################################################################