Subversion Repositories livecd

Rev

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