Subversion Repositories livecd

Rev

Go to most recent revision | Details | 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
 
27
cat > . /etc/init.d/livesys.functions << 'EOF_livesysfunctions'
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
 
194
## fix various bugs and issues
195
# unmute sound card
196
exists alsaunmute 0 2> /dev/null
197
 
198
# Stopgap fix for RH #217966; should be fixed in HAL instead
199
touch /media/.hal-mtab
200
 
201
# set the LiveCD hostname
202
[ ! "\\\$hostname" ] && hostname="livecd.localdomain"
203
sed -i -e 's/HOSTNAME=localhost.localdomain/HOSTNAME=\\\$hostname/g' /etc/sysconfig/network
204
/bin/hostname \\\$hostname
205
 
206
## create the LiveCD default user
207
# add default user with no password
208
/usr/sbin/useradd -c "LiveCD default user" \\\$LIVECD_USER
209
/usr/bin/passwd -d \\\$LIVECD_USER > /dev/null
210
# give default user sudo privileges
211
echo "\\\$LIVECD_USER     ALL=(ALL)     NOPASSWD: ALL" >> /etc/sudoers
212
 
213
## configure default user's desktop
214
# set up timed auto-login at 10 seconds
215
cat >> /etc/gdm/custom.conf << FOE
216
[daemon]
217
TimedLoginEnable=true
218
TimedLogin=LIVECD_USER
219
TimedLoginDelay=$LOGIN_DELAY
220
FOE
221
sed -i "s|LIVECD_USER|\\\$LIVECD_USER|" /etc/gdm/custom.conf
222
 
223
# add keyboard and display configuration utilities to the desktop
224
mkdir -p /home/\\\$LIVECD_USER/Desktop >/dev/null
225
cp /usr/share/applications/gnome-keyboard.desktop           /home/\\\$LIVECD_USER/Desktop/
226
cp /usr/share/applications/gnome-display-properties.desktop /home/\\\$LIVECD_USER/Desktop/
227
 
228
# disable screensaver locking
229
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool   /apps/gnome-screensaver/lock_enabled "false" >/dev/null
230
 
231
# disable PackageKit update checking by default
232
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
233
 
234
# detecting disk partitions and logical volumes 
235
CreateDesktopIconHD()
236
{
237
cat > /home/\\\$LIVECD_USER/Desktop/Local\ hard\ drives.desktop << EOF_HDicon
238
[Desktop Entry]
239
Encoding=UTF-8
240
Version=1.0
241
Type=Link
242
Name=Local hard drives
243
Name[en_US]=Local hard drives
244
Name[fr_CA]=Disques durs locaux
245
URL=/mnt/disc
246
Icon=/usr/share/icons/gnome/32x32/devices/gnome-dev-harddisk.png
247
EOF_HDicon
248
 
249
chmod 755 /home/\\\$LIVECD_USER/Desktop/Local\ hard\ drives.desktop
250
}
251
 
252
CreateDesktopIconLVM()
253
{
254
mkdir -p /home/\\\$LIVECD_USER/Desktop >/dev/null
255
 
256
cat > /home/\\\$LIVECD_USER/Desktop/Local\ logical\ volumes.desktop << EOF_LVMicon
257
[Desktop Entry]
258
Encoding=UTF-8
259
Version=1.0
260
Type=Link
261
Name=Local logical volumes
262
Name[en_US]=Local logical volumes
263
Name[fr_CA]=Volumes logiques locaux
264
URL=/mnt/lvm
265
Icon=/usr/share/icons/gnome/32x32/devices/gnome-dev-harddisk.png
266
EOF_LVMicon
267
 
268
chmod 755 /home/\\\$LIVECD_USER/Desktop/Local\ logical\ volumes.desktop
269
}
270
 
271
# don't mount disk partitions if 'nodiskmount' is given as a boot option
272
if ! strstr "\\\`cat /proc/cmdline\\\`" nodiskmount ; then
273
	MOUNTOPTION="ro"
274
	HARD_DISKS=\\\`egrep "[sh]d.\\\$" /proc/partitions | tr -s ' ' | sed 's/^  *//' | cut -d' ' -f4\\\`
275
 
276
	echo "Mounting hard disk partitions... "
277
	for DISK in \\\$HARD_DISKS; do
278
	    # Get the device and system info from fdisk (but only for fat and linux partitions).
279
	    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-\\\`
280
	    for FDISK_ENTRY in \\\$FDISK_INFO; do
281
		PARTITION=\\\`echo \\\$FDISK_ENTRY | cut -d':' -f1\\\`
282
		MOUNTPOINT="/mnt/disc/\\\${PARTITION##/dev/}"
283
		mkdir -p \\\$MOUNTPOINT
284
		MOUNTED=FALSE
285
 
286
		# get the partition type
287
		case \\\`echo \\\$FDISK_ENTRY | cut -d':' -f2-\\\` in
288
		*fat*) 
289
		    FSTYPES="vfat"
290
		    EXTRAOPTIONS=",uid=500";;
291
		*)
292
		    FSTYPES="ext4 ext3 ext2"
293
		    EXTRAOPTIONS="";;
294
		esac
295
 
296
		# try to mount the partition
297
		for FSTYPE in \\\$FSTYPES; do
298
		    if mount -o "\\\${MOUNTOPTION}\\\${EXTRAOPTIONS}" -t \\\$FSTYPE \\\$PARTITION \\\$MOUNTPOINT &>/dev/null; then
299
			echo "\\\$PARTITION \\\$MOUNTPOINT \\\$FSTYPE noauto,\\\${MOUNTOPTION}\\\${EXTRAOPTIONS} 0 0" >> /etc/fstab
300
			echo -n "\\\$PARTITION "
301
			MOUNTED=TRUE
302
			CreateDesktopIconHD
303
		    fi
304
		done
305
		[ \\\$MOUNTED = "FALSE" ] && rmdir \\\$MOUNTPOINT
306
	    done
307
	done
308
	echo
309
fi
310
 
311
# don't mount logical volumes if 'nolvmmount' is given as a boot option
312
if ! strstr "\\\`cat /proc/cmdline\\\`" nolvmmount ; then
313
        MOUNTOPTION="ro"
314
	FSTYPES="ext4 ext3 ext2"
315
	echo "Scanning for logical volumes..."
316
	if ! lvm vgscan 2>&1 | grep "No volume groups"; then
317
	    echo "Activating logical volumes ..."
318
	    modprobe dm_mod >/dev/null
319
	    lvm vgchange -ay
320
	    LOGICAL_VOLUMES=\\\`lvm lvdisplay -c | sed "s/^  *//" | cut -d: -f1\\\`
321
	    if [ ! -z "\\\$LOGICAL_VOLUMES" ]; then
322
		echo "Making device nodes ..."
323
		lvm vgmknodes
324
		echo -n "Mounting logical volumes ... "
325
		for VOLUME_NAME in \\\$LOGICAL_VOLUMES; do
326
		    VG_NAME=\\\`echo \\\$VOLUME_NAME | cut -d/ -f3\\\`
327
		    LV_NAME=\\\`echo \\\$VOLUME_NAME | cut -d/ -f4\\\`
328
		    MOUNTPOINT="/mnt/lvm/\\\${VG_NAME}-\\\${LV_NAME}"
329
		    mkdir -p \\\$MOUNTPOINT
330
 
331
		    MOUNTED=FALSE
332
		    for FSTYPE in \\\$FSTYPES; do
333
			if mount -o \\\$MOUNTOPTION -t \\\$FSTYPE \\\$VOLUME_NAME \\\$MOUNTPOINT &>/dev/null; then
334
			    echo "\\\$VOLUME_NAME \\\$MOUNTPOINT \\\$FSTYPE defaults,\\\${MOUNTOPTION} 0 0" >> /etc/fstab
335
			    echo -n "\\\$VOLUME_NAME "
336
			    MOUNTED=TRUE
337
			    CreateDesktopIconLVM
338
			    break
339
			fi
340
		    done
341
		    [ \\\$MOUNTED = FALSE ] && rmdir \\\$MOUNTPOINT
342
		done
343
		echo
344
 
345
	    else
346
		echo "No logical volumes found"
347
	    fi
348
	fi
349
fi
350
 
351
# give back ownership to the default user
352
chown -R \\\$LIVECD_USER:\\\$LIVECD_USER /home/\\\$LIVECD_USER
353
 
354
EOF_initscript
355
echo ###################################################################
356
echo ## End of livesys script
357
echo ###################################################################
358
 
359
 
360
 
361
echo ###################################################################
362
echo ## Creating the livesys init script - livesys-late
363
echo ###################################################################
364
 
365
cat > /etc/rc.d/init.d/livesys-late << EOF_lateinitscript
366
#!/bin/bash
367
#
368
# live: Late init script for live image
369
#
370
# chkconfig: 345 99 01
371
# description: Late init script for live image.
372
 
373
. /etc/init.d/functions
374
. /etc/livesys.conf
375
. /etc/init.d/livesys.functions
376
 
377
if ! strstr "\\\`cat /proc/cmdline\\\`" liveimg || [ "\\\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then
378
    exit 0
379
fi
380
 
381
touch /.liveimg-late-configured
382
 
383
# read boot parameters out of /proc/cmdline
384
ks=\\\$( cmdline_value ks )
385
xdriver=\\\$( cmdline_value xdriver )
386
kb=\\\$( cmdline_value kb )
387
 
388
# if liveinst or textinst is given, start anaconda
389
if [ "\\\$( cmdline_parameter liveinst )" ]; then
390
   plymouth --quit
391
   /usr/sbin/liveinst \\\$ks
392
fi
393
if [ "\\\$( cmdline_parameter textinst )" ] ; then
394
   plymouth --quit
395
   /usr/sbin/liveinst --text \\\$ks
396
fi
397
 
398
# configure X, allowing user to override xdriver
399
if [ "\\\$xdriver" ]; then
400
    exists system-config-display --noui --reconfig --set-depth=24 --set-driver=\\\$xdriver
401
fi
402
 
403
# configure keyboard
404
if [ "\\\$kb" ]; then
405
    exists system-config-keyboard --noui \\\$kb 
406
fi
407
 
408
EOF_lateinitscript
409
echo ###################################################################
410
echo ## End of livesys-late script
411
echo ###################################################################
412
 
413
 
414
 
415
echo ###################################################################
416
echo ## Configure the LiveCD
417
echo ###################################################################
418
 
419
# workaround avahi segfault (#279301)
420
touch /etc/resolv.conf
421
/sbin/restorecon /etc/resolv.conf
422
 
423
chmod 755 /etc/rc.d/init.d/livesys
424
/sbin/restorecon /etc/rc.d/init.d/livesys
425
/sbin/chkconfig --add livesys
426
 
427
chmod 755 /etc/rc.d/init.d/livesys-late
428
/sbin/restorecon /etc/rc.d/init.d/livesys-late
429
/sbin/chkconfig --add livesys-late
430
 
431
# turn off firstboot for livecd boots
432
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
433
 
434
# turn off services, which are not useful on LiveCD, to preserve resources
435
chkconfig --level 345 mdmonitor       off 2>/dev/null
436
chkconfig --level 345 setroubleshoot  off 2>/dev/null
437
chkconfig --level 345 auditd          off 2>/dev/null
438
chkconfig --level 345 crond           off 2>/dev/null
439
chkconfig --level 345 atd             off 2>/dev/null
440
chkconfig --level 345 readahead_early off 2>/dev/null
441
chkconfig --level 345 readahead_later off 2>/dev/null
442
chkconfig --level 345 kdump           off 2>/dev/null
443
chkconfig --level 345 microcode_ctl   off 2>/dev/null
444
chkconfig --level 345 openct          off 2>/dev/null
445
chkconfig --level 345 pcscd           off 2>/dev/null
446
chkconfig --level 345 postfix         off 2>/dev/null
447
 
448
# start afs with option -memcache (is this correct?)
449
[ -e /etc/sysconfig/afs ] && sed -i "s|^OPTIONS=.*|OPTIONS=\"-memcache\"|" /etc/sysconfig/afs
450
 
451
# go ahead and pre-make the man -k cache (#455968)
452
/usr/sbin/makewhatis -w
453
 
454
# save a little bit of space at least...
455
rm -f /var/lib/rpm/__db*
456
rm -f /boot/initrd*
457
rm -f /boot/initramfs*
458
# make sure there aren't core files lying around
459
rm -f /core*
460
 
461
# convince readahead not to collect
462
rm -f /.readahead_collect
463
touch /var/lib/readahead/early.sorted
464
 
465
# workaround clock syncing on shutdown that we don't want (#297421)
466
sed -i -e 's/hwclock/no-such-hwclock/g' /etc/rc.d/init.d/halt
467
 
468
# import RPM GPG keys
469
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
470
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
471
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-sl6
472
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-dawson
473
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-sl
474
 
475
# evolution is in the gnome launch panel (workaround to start thunderbird instead)
476
[ ! -e /usr/bin/evolution ] && ln -s /usr/bin/thunderbird /usr/bin/evolution
477
 
478
EOF_post
479
 
480
# run post-install script
481
/bin/bash -x /root/post-install 2>&1 | tee /root/post-install.log
482
 
483
%end
484
########################################################################
485
# End of configure LiveCD in chroot
486
########################################################################
487
 
488
 
489
 
490
%post --nochroot
491
########################################################################
492
# Post install in no chroot
493
# Must change "$" to "\$" and "`" to "\`" to avoid shell quoting
494
########################################################################
495
cat > /root/postnochroot-install << EOF_postnochroot
496
#!/bin/bash
497
 
498
# Copy licensing information
499
cp $INSTALL_ROOT/usr/share/doc/*-release-*/GPL $LIVE_ROOT/GPL
500
 
501
# add livecd-iso-to-disk utility on the LiveCD
502
# only works on x86, x86_64
503
if [ "\$(uname -i)" = "i386" -o "\$(uname -i)" = "x86_64" ]; then
504
  if [ ! -d \$LIVE_ROOT/LiveOS ]; then mkdir -p \$LIVE_ROOT/LiveOS ; fi
505
  cp /usr/bin/livecd-iso-to-disk \$LIVE_ROOT/LiveOS
506
fi
507
 
508
# customize boot menu entries
509
grep -B4 'menu default'  \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/default.txt
510
grep -B3 'xdriver=vesa'  \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/basicvideo.txt
511
grep -A3 'label check0'  \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/check.txt
512
grep -A2 'label memtest' \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/memtest.txt
513
grep -A2 'label local'   \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/localboot.txt
514
 
515
sed "s/label linux0/label linuxtext0/"   \$LIVE_ROOT/isolinux/default.txt > \$LIVE_ROOT/isolinux/textboot.txt
516
sed -i "s/Boot/Boot (Text Mode)/"                                           \$LIVE_ROOT/isolinux/textboot.txt
517
sed -i "s/liveimg/liveimg 3/"                                               \$LIVE_ROOT/isolinux/textboot.txt
518
sed -i "/menu default/d"                                                    \$LIVE_ROOT/isolinux/textboot.txt
519
 
520
sed "s/label linux0/label install0/"     \$LIVE_ROOT/isolinux/default.txt > \$LIVE_ROOT/isolinux/install.txt
521
sed -i "s/Boot/Install/"                                                    \$LIVE_ROOT/isolinux/install.txt
522
sed -i "s/liveimg/liveimg liveinst noswap nolvmmount/"                      \$LIVE_ROOT/isolinux/install.txt
523
sed -i "s/ quiet / /"                                                       \$LIVE_ROOT/isolinux/install.txt
524
sed -i "s/ rhgb / /"                                                        \$LIVE_ROOT/isolinux/install.txt
525
sed -i "/menu default/d"                                                    \$LIVE_ROOT/isolinux/install.txt
526
 
527
sed "s/label linux0/label textinstall0/" \$LIVE_ROOT/isolinux/default.txt > \$LIVE_ROOT/isolinux/textinstall.txt
528
sed -i "s/Boot/Install (Text Mode)/"                                        \$LIVE_ROOT/isolinux/textinstall.txt
529
sed -i "s/liveimg/liveimg textinst noswap nolvmmount/"                      \$LIVE_ROOT/isolinux/textinstall.txt
530
sed -i "s/ quiet / /"                                                       \$LIVE_ROOT/isolinux/textinstall.txt
531
sed -i "s/ rhgb / /"                                                        \$LIVE_ROOT/isolinux/textinstall.txt
532
sed -i "/menu default/d"                                                    \$LIVE_ROOT/isolinux/textinstall.txt
533
 
534
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
535
diff \$LIVE_ROOT/isolinux/isolinux.cfg \$LIVE_ROOT/isolinux/current.txt | sed '/^[0-9][0-9]*/d; s/^. //; /^---$/d' > \$LIVE_ROOT/isolinux/cleaned.txt
536
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
537
rm -f \$LIVE_ROOT/isolinux/*.txt
538
 
539
EOF_postnochroot
540
 
541
# run postnochroot-install script
542
/bin/bash -x /root/postnochroot-install 2>&1 | tee /root/postnochroot-install.log
543
 
544
%end
545
########################################################################
546
# End of configure LiveCD in nochroot
547
########################################################################