Subversion Repositories livecd

Rev

Rev 406 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 406 Rev 408
1
########################################################################
1
########################################################################
2
#
2
#
3
# sl67-live-base.ks
3
# sl67-live-base.ks
4
#
4
#
5
# Defines the basics for all kickstarts of sl67-live
5
# Defines the basics for all kickstarts of sl67-live
6
# Kickstarts including this template can override these settings
6
# Kickstarts including this template can override these settings
7
#
7
#
8
########################################################################
8
########################################################################
9
 
9
 
10
lang en_US.UTF-8
10
lang en_US.UTF-8
11
keyboard us
11
keyboard us
12
timezone US/Eastern
12
timezone US/Eastern
13
auth --useshadow --enablemd5
13
auth --useshadow --enablemd5
14
selinux --enforcing
14
selinux --enforcing
15
firewall --enabled --service=mdns
15
firewall --enabled --service=mdns
16
 
16
 
17
# SL repositories
17
# SL repositories
18
repo --name=base      --baseurl=http://ftp.scientificlinux.org/linux/scientific/6.7/$basearch/os/
18
repo --name=base      --baseurl=http://ftp.scientificlinux.org/linux/scientific/6.7/$basearch/os/
19
repo --name=security  --baseurl=http://ftp.scientificlinux.org/linux/scientific/6.7/$basearch/updates/security/
19
repo --name=security  --baseurl=http://ftp.scientificlinux.org/linux/scientific/6.7/$basearch/updates/security/
20
repo --name=sl-addons --baseurl=http://ftp.scientificlinux.org/linux/scientific/6.7/$basearch/addons/
20
repo --name=sl-addons --baseurl=http://ftp.scientificlinux.org/linux/scientific/6.7/$basearch/addons/
21
 
21
 
22
# or use a mirror close to you
22
# or use a mirror close to you
23
#repo --name=base      --baseurl=http://mirror.switch.ch/ftp/mirror/scientificlinux/6.7/$basearch/os/
23
#repo --name=base      --baseurl=http://mirror.switch.ch/ftp/mirror/scientificlinux/6.7/$basearch/os/
24
#repo --name=security  --baseurl=http://mirror.switch.ch/ftp/mirror/scientificlinux/6.7/$basearch/updates/security/
24
#repo --name=security  --baseurl=http://mirror.switch.ch/ftp/mirror/scientificlinux/6.7/$basearch/updates/security/
25
 
25
 
26
# fastbugs is disabled
26
# fastbugs is disabled
27
#repo --name=fastbugs  --baseurl=http://ftp.scientificlinux.org/linux/scientific/6.7/$basearch/updates/fastbugs/
27
#repo --name=fastbugs  --baseurl=http://ftp.scientificlinux.org/linux/scientific/6.7/$basearch/updates/fastbugs/
28
 
28
 
29
xconfig --startxonboot
29
xconfig --startxonboot
30
services --enabled=NetworkManager --disabled=network,sshd
30
services --enabled=NetworkManager --disabled=network,sshd
31
 
31
 
32
 
32
 
33
########################################################################
33
########################################################################
34
#
34
#
35
# Basic software packages
35
# Basic software packages
36
#
36
#
37
########################################################################
37
########################################################################
38
 
38
 
39
%packages
39
%packages
40
syslinux
40
syslinux
41
kernel
41
kernel
42
 
42
 
43
# basic software groups
43
# basic software groups
44
@base
44
@base
45
# package added to @base
45
# package added to @base
46
squashfs-tools
46
squashfs-tools
47
@core
47
@core
48
@graphical-admin-tools
48
@graphical-admin-tools
49
@network-file-system-client
49
@network-file-system-client
50
@network-tools
50
@network-tools
51
@x11
51
@x11
52
 
52
 
53
# remote-desktop-clients
53
# remote-desktop-clients
54
rdesktop
54
rdesktop
55
tsclient
55
tsclient
56
 
56
 
57
# other usefull packages
57
# other usefull packages
58
busybox
58
busybox
59
mailx
59
mailx
60
memtest86+
60
memtest86+
61
livecd-tools
61
livecd-tools
62
fuse
62
fuse
63
wpa_supplicant
63
wpa_supplicant
64
dracut-network
64
dracut-network
65
yum-plugin-fastestmirror
65
yum-plugin-fastestmirror
66
 
66
 
67
# livecd bits to set up the livecd and be able to install
67
# livecd bits to set up the livecd and be able to install
68
anaconda
68
anaconda
69
device-mapper-multipath
69
device-mapper-multipath
70
isomd5sum
70
isomd5sum
71
 
71
 
72
%end
72
%end
73
 
73
 
74
 
74
 
75
########################################################################
75
########################################################################
76
#
76
#
77
#  LiveCD post install in chroot 
77
#  LiveCD post install in chroot 
78
#
78
#
79
########################################################################
79
########################################################################
80
%post
80
%post
81
 
81
 
82
#***********************************************************************
82
#***********************************************************************
83
# Create LiveCD configuration file and LiveCD functions
83
# Create LiveCD configuration file and LiveCD functions
84
#***********************************************************************
84
#***********************************************************************
85
 
85
 
86
cat > /etc/livesys.conf << 'EOF_livesysconf'
86
cat > /etc/livesys.conf << 'EOF_livesysconf'
87
#--------------------------------------------------------------------
87
#--------------------------------------------------------------------
88
# Configuration file for LiveCD
88
# Configuration file for LiveCD
89
#--------------------------------------------------------------------
89
#--------------------------------------------------------------------
90
 
90
 
91
# default LiveCD user
91
# default LiveCD user
92
LIVECD_DEF_USER="liveuser"
92
LIVECD_DEF_USER="liveuser"
93
 
93
 
94
# delay in seconds before auto login
94
# delay in seconds before auto login
95
LOGIN_DELAY=15
95
LOGIN_DELAY=15
96
 
96
 
97
# Services which are off (not running) on the LiveCD
97
# Services which are off (not running) on the LiveCD
98
SERVICES_OFF="mdmonitor setroubleshoot auditd crond atd readahead_early \
98
SERVICES_OFF="mdmonitor setroubleshoot auditd crond atd readahead_early \
99
              readahead_later kdump microcode_ctl openct pcscd postfix  \
99
              readahead_later kdump microcode_ctl openct pcscd postfix  \
100
	      yum-updatesd"
100
	      yum-updatesd"
101
 
101
 
102
# Services which should be on, but are not on per default
102
# Services which should be on, but are not on per default
103
SERVICES_ON=""
103
SERVICES_ON=""
104
 
104
 
105
EOF_livesysconf
105
EOF_livesysconf
106
 
106
 
107
 
107
 
108
cat > /etc/init.d/livesys.functions << 'EOF_livesysfunctions'
108
cat > /etc/init.d/livesys.functions << 'EOF_livesysfunctions'
109
#--------------------------------------------------------------------
109
#--------------------------------------------------------------------
110
# livesys functions
110
# livesys functions
111
#--------------------------------------------------------------------
111
#--------------------------------------------------------------------
112
 
112
 
113
# egrep_o is a replacement for "egrep -o". It prints only the last matching text
113
# egrep_o is a replacement for "egrep -o". It prints only the last matching text
114
egrep_o() {
114
egrep_o() {
115
   cat | egrep "$1" | sed -r "s/.*($1).*/\\1/"
115
   cat | egrep "$1" | sed -r "s/.*($1).*/\\1/"
116
}
116
}
117
 
117
 
118
# boot parameter
118
# boot parameter
119
cmdline_parameter() {
119
cmdline_parameter() {
120
   CMDLINE=/proc/cmdline
120
   CMDLINE=/proc/cmdline
121
   cat "$CMDLINE" | egrep_o "(^|[[:space:]]+)$1(\$|=|[[:space:]]+)" | egrep_o "$1"
121
   cat "$CMDLINE" | egrep_o "(^|[[:space:]]+)$1(\$|=|[[:space:]]+)" | egrep_o "$1"
122
}
122
}
123
 
123
 
124
# boot parameter value
124
# boot parameter value
125
cmdline_value()
125
cmdline_value()
126
{
126
{
127
   CMDLINE=/proc/cmdline
127
   CMDLINE=/proc/cmdline
128
   cat "$CMDLINE" | egrep_o "(^|[[:space:]]+)$1=([^[:space:]]+)" | egrep_o "=.*" | cut -b 2- | tail -n 1
128
   cat "$CMDLINE" | egrep_o "(^|[[:space:]]+)$1=([^[:space:]]+)" | egrep_o "=.*" | cut -b 2- | tail -n 1
129
}
129
}
130
 
130
 
131
exists() {
131
exists() {
132
    which $1 >/dev/null 2>&1 || return
132
    which $1 >/dev/null 2>&1 || return
133
    $*
133
    $*
134
}
134
}
135
 
135
 
136
EOF_livesysfunctions
136
EOF_livesysfunctions
137
 
137
 
138
 
138
 
139
#***********************************************************************
139
#***********************************************************************
140
# Create /root/post-install
140
# Create /root/post-install
141
# Must change "$" to "\$" and "`" to "\`" to avoid shell quoting
141
# Must change "$" to "\$" and "`" to "\`" to avoid shell quoting
142
#***********************************************************************
142
#***********************************************************************
143
 
143
 
144
cat > /root/post-install << EOF_post
144
cat > /root/post-install << EOF_post
145
#!/bin/bash
145
#!/bin/bash
146
 
146
 
147
#***********************************************************************
147
#***********************************************************************
148
# Create the livesys init script - /etc/rc.d/init.d/livesys
148
# Create the livesys init script - /etc/rc.d/init.d/livesys
149
#***********************************************************************
149
#***********************************************************************
150
 
150
 
151
echo "Creating the livesys init script - livesys"
151
echo "Creating the livesys init script - livesys"
152
 
152
 
153
cat > /etc/rc.d/init.d/livesys << EOF_initscript
153
cat > /etc/rc.d/init.d/livesys << EOF_initscript
154
#!/bin/bash
154
#!/bin/bash
155
#
155
#
156
# live: Init script for live image
156
# live: Init script for live image
157
#
157
#
158
# chkconfig: 345 00 99
158
# chkconfig: 345 00 99
159
# description: Init script for live image.
159
# description: Init script for live image.
160
 
160
 
161
. /etc/init.d/functions
161
. /etc/init.d/functions
162
. /etc/livesys.conf
162
. /etc/livesys.conf
163
. /etc/init.d/livesys.functions
163
. /etc/init.d/livesys.functions
164
 
164
 
165
# exit if not running from LiveCD
165
# exit if not running from LiveCD
166
if [ ! "\\\$( cmdline_parameter liveimg )" ] || [ "\\\$1" != "start" ]; then
166
if [ ! "\\\$( cmdline_parameter liveimg )" ] || [ "\\\$1" != "start" ]; then
167
    exit 0
167
    exit 0
168
fi
168
fi
169
 
169
 
170
[ -e /.liveimg-configured ] && configdone=1
170
[ -e /.liveimg-configured ] && configdone=1
171
 
171
 
172
touch /.liveimg-configured
172
touch /.liveimg-configured
173
 
173
 
174
### read boot parameters out of /proc/cmdline
174
### read boot parameters out of /proc/cmdline
175
 
175
 
176
# hostname
176
# hostname
177
hostname=\\\$( cmdline_value hostname )
177
hostname=\\\$( cmdline_value hostname )
178
 
178
 
179
# afs cell
179
# afs cell
180
CELL=\\\$( cmdline_value cell )
180
CELL=\\\$( cmdline_value cell )
181
 
181
 
182
# services to turn on / off
182
# services to turn on / off
183
SERVICEON=\\\$( cmdline_value serviceon )
183
SERVICEON=\\\$( cmdline_value serviceon )
184
SERVICEOFF=\\\$( cmdline_value serviceoff )
184
SERVICEOFF=\\\$( cmdline_value serviceoff )
185
 
185
 
186
# cups server
186
# cups server
187
CUPS=\\\$( cmdline_value cups )
187
CUPS=\\\$( cmdline_value cups )
188
 
188
 
189
# password
189
# password
190
PW=\\\$( cmdline_value pw )
190
PW=\\\$( cmdline_value pw )
191
[ ! \\\$PW ] && PW=\\\$( cmdline_value passwd )
191
[ ! \\\$PW ] && PW=\\\$( cmdline_value passwd )
192
 
192
 
193
# set livecd user
193
# set livecd user
194
LIVECD_USER=\\\$( cmdline_value user )
194
LIVECD_USER=\\\$( cmdline_value user )
195
[ ! "\\\$LIVECD_USER" ] && LIVECD_USER=\\\$LIVECD_DEF_USER
195
[ ! "\\\$LIVECD_USER" ] && LIVECD_USER=\\\$LIVECD_DEF_USER
196
 
196
 
197
 
197
 
198
### mount live image
198
### mount live image
199
if [ -b \\\`readlink -f /dev/live\\\` ]; then
199
if [ -b \\\`readlink -f /dev/live\\\` ]; then
200
   mkdir -p /mnt/live
200
   mkdir -p /mnt/live
201
   mount -o ro /dev/live /mnt/live 2>/dev/null || mount /dev/live /mnt/live
201
   mount -o ro /dev/live /mnt/live 2>/dev/null || mount /dev/live /mnt/live
202
fi
202
fi
203
 
203
 
204
livedir=\\\$( cmdline_value live_dir )
204
livedir=\\\$( cmdline_value live_dir )
205
[ ! "\\\$livedir" ] && livedir="LiveOS"
205
[ ! "\\\$livedir" ] && livedir="LiveOS"
206
 
206
 
207
### enable swaps unless requested otherwise
207
### enable swaps unless requested otherwise
208
swaps=\\\`blkid -t TYPE=swap -o device\\\`
208
swaps=\\\`blkid -t TYPE=swap -o device\\\`
209
if [ ! "\\\$( cmdline_parameter noswap )" ] && [ -n "\\\$swaps" ] ; then
209
if [ ! "\\\$( cmdline_parameter noswap )" ] && [ -n "\\\$swaps" ] ; then
210
  for s in \\\$swaps ; do
210
  for s in \\\$swaps ; do
211
    action "Enabling swap partition \\\$s" swapon \\\$s
211
    action "Enabling swap partition \\\$s" swapon \\\$s
212
  done
212
  done
213
fi
213
fi
214
if [ ! "\\\$( cmdline_parameter noswap )" ] && [ -f /mnt/live/\\\${livedir}/swap.img ] ; then
214
if [ ! "\\\$( cmdline_parameter noswap )" ] && [ -f /mnt/live/\\\${livedir}/swap.img ] ; then
215
  action "Enabling swap file" swapon /mnt/live/\\\${livedir}/swap.img
215
  action "Enabling swap file" swapon /mnt/live/\\\${livedir}/swap.img
216
fi
216
fi
217
 
217
 
218
### functions for persisten Home 
218
### functions for persisten Home 
219
mountPersistentHome() {
219
mountPersistentHome() {
220
  # support label/uuid
220
  # support label/uuid
221
  if [ "\\\${homedev##LABEL=}" != "\\\${homedev}" -o "\\\${homedev##UUID=}" != "\\\${homedev}" ]; then
221
  if [ "\\\${homedev##LABEL=}" != "\\\${homedev}" -o "\\\${homedev##UUID=}" != "\\\${homedev}" ]; then
222
    homedev=\\\`/sbin/blkid -o device -t "\\\$homedev"\\\`
222
    homedev=\\\`/sbin/blkid -o device -t "\\\$homedev"\\\`
223
  fi
223
  fi
224
 
224
 
225
  # if we're given a file rather than a blockdev, loopback it
225
  # if we're given a file rather than a blockdev, loopback it
226
  if [ "\\\${homedev##mtd}" != "\\\${homedev}" ]; then
226
  if [ "\\\${homedev##mtd}" != "\\\${homedev}" ]; then
227
    # mtd devs don't have a block device but get magic-mounted with -t jffs2
227
    # mtd devs don't have a block device but get magic-mounted with -t jffs2
228
    mountopts="-t jffs2"
228
    mountopts="-t jffs2"
229
  elif [ ! -b "\\\$homedev" ]; then
229
  elif [ ! -b "\\\$homedev" ]; then
230
    loopdev=\\\`losetup -f\\\`
230
    loopdev=\\\`losetup -f\\\`
231
    if [ "\\\${homedev##/mnt/live}" != "\\\${homedev}" ]; then
231
    if [ "\\\${homedev##/mnt/live}" != "\\\${homedev}" ]; then
232
      action "Remounting live store r/w" mount -o remount,rw /mnt/live
232
      action "Remounting live store r/w" mount -o remount,rw /mnt/live
233
    fi
233
    fi
234
    losetup \\\$loopdev \\\$homedev
234
    losetup \\\$loopdev \\\$homedev
235
    homedev=\\\$loopdev
235
    homedev=\\\$loopdev
236
  fi
236
  fi
237
 
237
 
238
  # if it's encrypted, we need to unlock it
238
  # if it's encrypted, we need to unlock it
239
  if [ "\\\$(/sbin/blkid -s TYPE -o value \\\$homedev 2>/dev/null)" = "crypto_LUKS" ]; then
239
  if [ "\\\$(/sbin/blkid -s TYPE -o value \\\$homedev 2>/dev/null)" = "crypto_LUKS" ]; then
240
    echo
240
    echo
241
    echo "Setting up encrypted /home device"
241
    echo "Setting up encrypted /home device"
242
    plymouth ask-for-password --command="cryptsetup luksOpen \\\$homedev EncHome"
242
    plymouth ask-for-password --command="cryptsetup luksOpen \\\$homedev EncHome"
243
    homedev=/dev/mapper/EncHome
243
    homedev=/dev/mapper/EncHome
244
  fi
244
  fi
245
 
245
 
246
  # and finally do the mount
246
  # and finally do the mount
247
  mount \\\$mountopts \\\$homedev /home
247
  mount \\\$mountopts \\\$homedev /home
248
  # if we have /home under what's passed for persistent home, then
248
  # if we have /home under what's passed for persistent home, then
249
  # we should make that the real /home.  useful for mtd device on olpc
249
  # we should make that the real /home.  useful for mtd device on olpc
250
  if [ -d /home/home ]; then mount --bind /home/home /home ; fi
250
  if [ -d /home/home ]; then mount --bind /home/home /home ; fi
251
  [ -x /sbin/restorecon ] && /sbin/restorecon /home
251
  [ -x /sbin/restorecon ] && /sbin/restorecon /home
252
  if [ -d /home/\\\$LIVECD_USER ]; then USERADDARGS="-M" ; fi
252
  if [ -d /home/\\\$LIVECD_USER ]; then USERADDARGS="-M" ; fi
253
}
253
}
254
 
254
 
255
findPersistentHome() {
255
findPersistentHome() {
256
  for arg in \\\`cat /proc/cmdline\\\` ; do
256
  for arg in \\\`cat /proc/cmdline\\\` ; do
257
    if [ "\\\${arg##persistenthome=}" != "\\\${arg}" ]; then
257
    if [ "\\\${arg##persistenthome=}" != "\\\${arg}" ]; then
258
      homedev=\\\${arg##persistenthome=}
258
      homedev=\\\${arg##persistenthome=}
259
      return
259
      return
260
    fi
260
    fi
261
  done
261
  done
262
}
262
}
263
 
263
 
264
if strstr "\\\`cat /proc/cmdline\\\`" persistenthome= ; then
264
if strstr "\\\`cat /proc/cmdline\\\`" persistenthome= ; then
265
  findPersistentHome
265
  findPersistentHome
266
elif [ -e /mnt/live/\\\${livedir}/home.img ]; then
266
elif [ -e /mnt/live/\\\${livedir}/home.img ]; then
267
  homedev=/mnt/live/\\\${livedir}/home.img
267
  homedev=/mnt/live/\\\${livedir}/home.img
268
fi
268
fi
269
 
269
 
270
### if we have a persistent /home, then we want to go ahead and mount it
270
### if we have a persistent /home, then we want to go ahead and mount it
271
if ! strstr "\\\`cat /proc/cmdline\\\`" nopersistenthome && [ -n "\\\$homedev" ] ; then
271
if ! strstr "\\\`cat /proc/cmdline\\\`" nopersistenthome && [ -n "\\\$homedev" ] ; then
272
  action "Mounting persistent /home" mountPersistentHome
272
  action "Mounting persistent /home" mountPersistentHome
273
fi
273
fi
274
 
274
 
275
### make it so that we don't do writing to the overlay for things which
275
### make it so that we don't do writing to the overlay for things which
276
### are just tmpdirs/caches
276
### are just tmpdirs/caches
277
mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum
277
mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum
278
mount -t tmpfs tmp /tmp
278
mount -t tmpfs tmp /tmp
279
mount -t tmpfs vartmp /var/tmp
279
mount -t tmpfs vartmp /var/tmp
280
[ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /tmp /var/tmp >/dev/null 2>&1
280
[ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /tmp /var/tmp >/dev/null 2>&1
281
 
281
 
282
### set afs cell if given by boot parameter
282
### set afs cell if given by boot parameter
283
if [ "\\\$CELL" ]; then
283
if [ "\\\$CELL" ]; then
284
    [ -e /usr/vice/etc/ThisCell ] && echo \\\$CELL > /usr/vice/etc/ThisCell
284
    [ -e /usr/vice/etc/ThisCell ] && echo \\\$CELL > /usr/vice/etc/ThisCell
285
fi
285
fi
286
 
286
 
287
### set cups server
287
### set cups server
288
if [ "\\\$CUPS" ]; then
288
if [ "\\\$CUPS" ]; then
289
    if [ -e /etc/cups/client.conf ]; then
289
    if [ -e /etc/cups/client.conf ]; then
290
        sed -i "s|.*ServerName .*|ServerName  \\\$CUPS|" /etc/cups/client.conf
290
        sed -i "s|.*ServerName .*|ServerName  \\\$CUPS|" /etc/cups/client.conf
291
        grep -q ServerName /etc/cups/client.conf || echo "ServerName  \\\$CUPS" >> /etc/cups/client.conf 
291
        grep -q ServerName /etc/cups/client.conf || echo "ServerName  \\\$CUPS" >> /etc/cups/client.conf 
292
    fi
292
    fi
293
fi
293
fi
294
 
294
 
295
### set the LiveCD hostname
295
### set the LiveCD hostname
296
[ ! "\\\$hostname" ] && hostname="livecd.localdomain"
296
[ ! "\\\$hostname" ] && hostname="livecd.localdomain"
297
sed -i -e "s|HOSTNAME=.*|HOSTNAME=\\\$hostname|g" /etc/sysconfig/network
297
sed -i -e "s|HOSTNAME=.*|HOSTNAME=\\\$hostname|g" /etc/sysconfig/network
298
/bin/hostname \\\$hostname
298
/bin/hostname \\\$hostname
299
 
299
 
300
#-----------------------------------------------------------------------
300
#-----------------------------------------------------------------------
301
# EXIT here if LiveCD has already been configured         
301
# EXIT here if LiveCD has already been configured         
302
# happens if you start the LiveCD with persistent changes 
302
# happens if you start the LiveCD with persistent changes 
303
#-----------------------------------------------------------------------
303
#-----------------------------------------------------------------------
304
 
304
 
305
[ "\\\$configdone" ] && exit 0
305
[ "\\\$configdone" ] && exit 0
306
 
306
 
307
### turn off services, which are not useful on LiveCD, to preserve resources
307
### turn off services, which are not useful on LiveCD, to preserve resources
308
if [ "\\\$SERVICES_OFF" ]; then
308
if [ "\\\$SERVICES_OFF" ]; then
309
    for service in \\\$SERVICES_OFF ; do
309
    for service in \\\$SERVICES_OFF ; do
310
        [ -f /etc/init.d/\\\$service ] && chkconfig \\\$service off 2>/dev/null
310
        [ -f /etc/init.d/\\\$service ] && chkconfig \\\$service off 2>/dev/null
311
    done
311
    done
312
fi
312
fi
313
 
313
 
314
### turn on services, which are off by default
314
### turn on services, which are off by default
315
if [ "\\\$SERVICES_ON" ]; then
315
if [ "\\\$SERVICES_ON" ]; then
316
    for service in \\\$SERVICES_ON ; do
316
    for service in \\\$SERVICES_ON ; do
317
        [ -f /etc/init.d/\\\$service ] && chkconfig \\\$service ofn  2>/dev/null
317
        [ -f /etc/init.d/\\\$service ] && chkconfig \\\$service ofn  2>/dev/null
318
    done
318
    done
319
fi
319
fi
320
 
320
 
321
### services off, from command line parameter (turn it off once again)
321
### services off, from command line parameter (turn it off once again)
322
if [ "\\\$SERVICEOFF" ]; then
322
if [ "\\\$SERVICEOFF" ]; then
323
    for service in \\\$( echo "\\\$SERVICEOFF" | tr ':' ' ' ); do
323
    for service in \\\$( echo "\\\$SERVICEOFF" | tr ':' ' ' ); do
324
        [ -f /etc/init.d/\\\$service ] && chkconfig \\\$service off 2>/dev/null
324
        [ -f /etc/init.d/\\\$service ] && chkconfig \\\$service off 2>/dev/null
325
    done
325
    done
326
fi
326
fi
327
 
327
 
328
# services on, from command line parameter (turn it ofn once again)
328
# services on, from command line parameter (turn it ofn once again)
329
if [ "\\\$SERVICEON" ]; then
329
if [ "\\\$SERVICEON" ]; then
330
    for service in \\\$( echo "\\\$SERVICEON" | tr ':' ' ' ); do
330
    for service in \\\$( echo "\\\$SERVICEON" | tr ':' ' ' ); do
331
        [ -f /etc/init.d/\\\$service ] && chkconfig \\\$service on  2>/dev/null
331
        [ -f /etc/init.d/\\\$service ] && chkconfig \\\$service on  2>/dev/null
332
    done
332
    done
333
fi
333
fi
334
 
334
 
335
### fix various bugs and issues
335
### fix various bugs and issues
336
# unmute sound card
336
# unmute sound card
337
exists alsaunmute 0 2> /dev/null
337
exists alsaunmute 0 2> /dev/null
338
 
338
 
339
# turn off firstboot for livecd boots
339
# turn off firstboot for livecd boots
340
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
340
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
341
 
341
 
342
# start afs with option -memcache (gets a kernel panic on some system - do not use it for the moment)
342
# start afs with option -memcache (gets a kernel panic on some system - do not use it for the moment)
343
# [ -e /etc/sysconfig/afs ] && sed -i "s|^OPTIONS=.*|OPTIONS=\"-memcache\"|" /etc/sysconfig/afs
343
# [ -e /etc/sysconfig/afs ] && sed -i "s|^OPTIONS=.*|OPTIONS=\"-memcache\"|" /etc/sysconfig/afs
344
 
344
 
345
# Stopgap fix for RH #217966; should be fixed in HAL instead
345
# Stopgap fix for RH #217966; should be fixed in HAL instead
346
touch /media/.hal-mtab
346
touch /media/.hal-mtab
347
 
347
 
348
### create the LiveCD default user
348
### create the LiveCD default user
349
# add default user with no password
349
# add default user with no password
350
/usr/sbin/useradd -c "LiveCD default user" \\\$LIVECD_USER
350
/usr/sbin/useradd -c "LiveCD default user" \\\$LIVECD_USER
351
/usr/bin/passwd -d \\\$LIVECD_USER > /dev/null
351
/usr/bin/passwd -d \\\$LIVECD_USER > /dev/null
352
# give default user sudo privileges
352
# give default user sudo privileges
353
# echo "\\\$LIVECD_USER     ALL=(ALL)     NOPASSWD: ALL" >> /etc/sudoers
353
# echo "\\\$LIVECD_USER     ALL=(ALL)     NOPASSWD: ALL" >> /etc/sudoers
354
 
354
 
355
### set password
355
### set password
356
if [ "\\\$PW" ]; then
356
if [ "\\\$PW" ]; then
357
    echo \\\$PW | passwd --stdin root >/dev/null
357
    echo \\\$PW | passwd --stdin root >/dev/null
358
    echo \\\$PW | passwd --stdin \\\$LIVECD_USER >/dev/null
358
    echo \\\$PW | passwd --stdin \\\$LIVECD_USER >/dev/null
359
else
359
else
360
    # set empty password
360
    # set empty password
361
    sed -i "s|^root:[^:]*:|root::|"                       /etc/shadow
361
    sed -i "s|^root:[^:]*:|root::|"                       /etc/shadow
362
    sed -i "s|^\\\$LIVECD_USER:[^:]*:|\\\$LIVECD_USER::|" /etc/shadow
362
    sed -i "s|^\\\$LIVECD_USER:[^:]*:|\\\$LIVECD_USER::|" /etc/shadow
363
fi
363
fi
364
 
364
 
365
### enable auto-login
365
### enable auto-login
366
if [ ! "\\\$( cmdline_parameter noautologin )" ]; then
366
if [ ! "\\\$( cmdline_parameter noautologin )" ]; then
367
    cat >> /etc/gdm/custom.conf << FOE
367
    cat >> /etc/gdm/custom.conf << FOE
368
[daemon]
368
[daemon]
369
TimedLoginEnable=true
369
TimedLoginEnable=true
370
TimedLogin=LIVECD_USER
370
TimedLogin=LIVECD_USER
371
TimedLoginDelay=\\\$LOGIN_DELAY
371
TimedLoginDelay=\\\$LOGIN_DELAY
372
FOE
372
FOE
373
    sed -i "s|LIVECD_USER|\\\$LIVECD_USER|" /etc/gdm/custom.conf
373
    sed -i "s|LIVECD_USER|\\\$LIVECD_USER|" /etc/gdm/custom.conf
374
fi
374
fi
375
 
375
 
376
### add keyboard and display configuration utilities to the desktop
376
### add keyboard and display configuration utilities to the desktop
377
mkdir -p /home/\\\$LIVECD_USER/Desktop >/dev/null
377
mkdir -p /home/\\\$LIVECD_USER/Desktop >/dev/null
378
cp /usr/share/applications/gnome-keyboard.desktop           /home/\\\$LIVECD_USER/Desktop/
378
cp /usr/share/applications/gnome-keyboard.desktop           /home/\\\$LIVECD_USER/Desktop/
379
cp /usr/share/applications/gnome-display-properties.desktop /home/\\\$LIVECD_USER/Desktop/
379
cp /usr/share/applications/gnome-display-properties.desktop /home/\\\$LIVECD_USER/Desktop/
380
 
380
 
381
### disable screensaver locking
381
### disable screensaver locking
382
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool   /apps/gnome-screensaver/lock_enabled "false" >/dev/null
382
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool   /apps/gnome-screensaver/lock_enabled "false" >/dev/null
383
 
383
 
384
### don't do packagekit checking by default
384
### don't do packagekit checking by default
385
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
385
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
386
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/update-icon/frequency_get_updates never >/dev/null
386
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/update-icon/frequency_get_updates never >/dev/null
387
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/update-icon/frequency_get_upgrades never >/dev/null
387
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/update-icon/frequency_get_upgrades never >/dev/null
388
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/update-icon/frequency_refresh_cache never >/dev/null
388
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/update-icon/frequency_refresh_cache never >/dev/null
389
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/update-icon/notify_available false >/dev/null
389
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/update-icon/notify_available false >/dev/null
390
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/update-icon/notify_distro_upgrades false >/dev/null
390
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/update-icon/notify_distro_upgrades false >/dev/null
391
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_firmware false >/dev/null
391
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_firmware false >/dev/null
392
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_hardware false >/dev/null
392
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_hardware false >/dev/null
393
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_codec_helper false >/dev/null
393
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_codec_helper false >/dev/null
394
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_font_helper false >/dev/null
394
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_font_helper false >/dev/null
395
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
395
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
396
 
396
 
397
### start system-config-firewall with su 
397
### start system-config-firewall with su 
398
#  (bugfix: system-config-firewall does not work when root has no password)
398
#  (bugfix: system-config-firewall does not work when root has no password)
399
sed -i "s|^Exec=.*|Exec=su - -c /usr/bin/system-config-firewall|" /usr/share/applications/system-config-firewall.desktop
399
sed -i "s|^Exec=.*|Exec=su - -c /usr/bin/system-config-firewall|" /usr/share/applications/system-config-firewall.desktop
400
sed -i "s|^Terminal=.*|Terminal=true|"                            /usr/share/applications/system-config-firewall.desktop
400
sed -i "s|^Terminal=.*|Terminal=true|"                            /usr/share/applications/system-config-firewall.desktop
401
 
401
 
402
### don't use prelink on a running live image
402
### don't use prelink on a running live image
403
sed -i 's/PRELINKING=yes/PRELINKING=no/' /etc/sysconfig/prelink &>/dev/null
403
sed -i 's/PRELINKING=yes/PRELINKING=no/' /etc/sysconfig/prelink &>/dev/null
404
 
404
 
-
 
405
### Switching to Thunderbird as the default MUA
-
 
406
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults --type string --set /desktop/gnome/url-handlers/mailto/command "thunderbird %" >/dev/null
-
 
407
 
-
 
408
### Creating a file for anaconda, to create the correct grub entry
-
 
409
echo -e "SL.$(uname -m)\nScientific Linux\n6.7\nyes" > /.buildstamp
405
 
410
 
406
###-----------------------------------------------------------------------
411
###-----------------------------------------------------------------------
407
# detecting disk partitions and logical volumes (disabled by default)
412
# detecting disk partitions and logical volumes (disabled by default)
408
# use boot parameter automount to enable it
413
# use boot parameter automount to enable it
409
###-----------------------------------------------------------------------
414
###-----------------------------------------------------------------------
410
 
415
 
411
CreateDesktopIconHD()
416
CreateDesktopIconHD()
412
{
417
{
413
cat > /home/\\\$LIVECD_USER/Desktop/Local\ hard\ drives.desktop << EOF_HDicon
418
cat > /home/\\\$LIVECD_USER/Desktop/Local\ hard\ drives.desktop << EOF_HDicon
414
[Desktop Entry]
419
[Desktop Entry]
415
Encoding=UTF-8
420
Encoding=UTF-8
416
Version=1.0
421
Version=1.0
417
Type=Link
422
Type=Link
418
Name=Local hard drives
423
Name=Local hard drives
419
Name[en_US]=Local hard drives
424
Name[en_US]=Local hard drives
420
Name[fr_CA]=Disques durs locaux
425
Name[fr_CA]=Disques durs locaux
421
URL=/mnt/disc
426
URL=/mnt/disc
422
Icon=/usr/share/icons/gnome/32x32/devices/gnome-dev-harddisk.png
427
Icon=/usr/share/icons/gnome/32x32/devices/gnome-dev-harddisk.png
423
EOF_HDicon
428
EOF_HDicon
424
 
429
 
425
chmod 755 /home/\\\$LIVECD_USER/Desktop/Local\ hard\ drives.desktop
430
chmod 755 /home/\\\$LIVECD_USER/Desktop/Local\ hard\ drives.desktop
426
}
431
}
427
 
432
 
428
CreateDesktopIconLVM()
433
CreateDesktopIconLVM()
429
{
434
{
430
mkdir -p /home/\\\$LIVECD_USER/Desktop >/dev/null
435
mkdir -p /home/\\\$LIVECD_USER/Desktop >/dev/null
431
 
436
 
432
cat > /home/\\\$LIVECD_USER/Desktop/Local\ logical\ volumes.desktop << EOF_LVMicon
437
cat > /home/\\\$LIVECD_USER/Desktop/Local\ logical\ volumes.desktop << EOF_LVMicon
433
[Desktop Entry]
438
[Desktop Entry]
434
Encoding=UTF-8
439
Encoding=UTF-8
435
Version=1.0
440
Version=1.0
436
Type=Link
441
Type=Link
437
Name=Local logical volumes
442
Name=Local logical volumes
438
Name[en_US]=Local logical volumes
443
Name[en_US]=Local logical volumes
439
Name[fr_CA]=Volumes logiques locaux
444
Name[fr_CA]=Volumes logiques locaux
440
URL=/mnt/lvm
445
URL=/mnt/lvm
441
Icon=/usr/share/icons/gnome/32x32/devices/gnome-dev-harddisk.png
446
Icon=/usr/share/icons/gnome/32x32/devices/gnome-dev-harddisk.png
442
EOF_LVMicon
447
EOF_LVMicon
443
 
448
 
444
chmod 755 /home/\\\$LIVECD_USER/Desktop/Local\ logical\ volumes.desktop
449
chmod 755 /home/\\\$LIVECD_USER/Desktop/Local\ logical\ volumes.desktop
445
}
450
}
446
 
451
 
447
# mount disk partitions if 'automount' is given as a boot option
452
# mount disk partitions if 'automount' is given as a boot option
448
if [ "\\\$( cmdline_parameter automount )" ]; then
453
if [ "\\\$( cmdline_parameter automount )" ]; then
449
	MOUNTOPTION="rw"
454
	MOUNTOPTION="rw"
450
	HARD_DISKS=\\\`egrep "[sh]d.\\\$" /proc/partitions | tr -s ' ' | sed 's/^  *//' | cut -d' ' -f4\\\`
455
	HARD_DISKS=\\\`egrep "[sh]d.\\\$" /proc/partitions | tr -s ' ' | sed 's/^  *//' | cut -d' ' -f4\\\`
451
 
456
 
452
	echo "Mounting hard disk partitions... "
457
	echo "Mounting hard disk partitions... "
453
	for DISK in \\\$HARD_DISKS; do
458
	for DISK in \\\$HARD_DISKS; do
454
	    # Get the device and system info from fdisk (but only for fat and linux partitions).
459
	    # Get the device and system info from fdisk (but only for fat and linux partitions).
455
	    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-\\\`
460
	    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-\\\`
456
	    for FDISK_ENTRY in \\\$FDISK_INFO; do
461
	    for FDISK_ENTRY in \\\$FDISK_INFO; do
457
		PARTITION=\\\`echo \\\$FDISK_ENTRY | cut -d':' -f1\\\`
462
		PARTITION=\\\`echo \\\$FDISK_ENTRY | cut -d':' -f1\\\`
458
		MOUNTPOINT="/mnt/disc/\\\${PARTITION##/dev/}"
463
		MOUNTPOINT="/mnt/disc/\\\${PARTITION##/dev/}"
459
		mkdir -p \\\$MOUNTPOINT
464
		mkdir -p \\\$MOUNTPOINT
460
		MOUNTED=FALSE
465
		MOUNTED=FALSE
461
 
466
 
462
		# get the partition type
467
		# get the partition type
463
		case \\\`echo \\\$FDISK_ENTRY | cut -d':' -f2-\\\` in
468
		case \\\`echo \\\$FDISK_ENTRY | cut -d':' -f2-\\\` in
464
		*fat*) 
469
		*fat*) 
465
		    FSTYPES="vfat"
470
		    FSTYPES="vfat"
466
		    EXTRAOPTIONS=",uid=500";;
471
		    EXTRAOPTIONS=",uid=500";;
467
		*)
472
		*)
468
		    FSTYPES="ext4 ext3 ext2"
473
		    FSTYPES="ext4 ext3 ext2"
469
		    EXTRAOPTIONS="";;
474
		    EXTRAOPTIONS="";;
470
		esac
475
		esac
471
 
476
 
472
		# try to mount the partition
477
		# try to mount the partition
473
		for FSTYPE in \\\$FSTYPES; do
478
		for FSTYPE in \\\$FSTYPES; do
474
		    if mount -o "\\\${MOUNTOPTION}\\\${EXTRAOPTIONS}" -t \\\$FSTYPE \\\$PARTITION \\\$MOUNTPOINT &>/dev/null; then
479
		    if mount -o "\\\${MOUNTOPTION}\\\${EXTRAOPTIONS}" -t \\\$FSTYPE \\\$PARTITION \\\$MOUNTPOINT &>/dev/null; then
475
			echo "\\\$PARTITION \\\$MOUNTPOINT \\\$FSTYPE noauto,\\\${MOUNTOPTION}\\\${EXTRAOPTIONS} 0 0" >> /etc/fstab
480
			echo "\\\$PARTITION \\\$MOUNTPOINT \\\$FSTYPE noauto,\\\${MOUNTOPTION}\\\${EXTRAOPTIONS} 0 0" >> /etc/fstab
476
			echo -n "\\\$PARTITION "
481
			echo -n "\\\$PARTITION "
477
			MOUNTED=TRUE
482
			MOUNTED=TRUE
478
			CreateDesktopIconHD
483
			CreateDesktopIconHD
479
		    fi
484
		    fi
480
		done
485
		done
481
		[ \\\$MOUNTED = "FALSE" ] && rmdir \\\$MOUNTPOINT
486
		[ \\\$MOUNTED = "FALSE" ] && rmdir \\\$MOUNTPOINT
482
	    done
487
	    done
483
	done
488
	done
484
	echo
489
	echo
485
fi
490
fi
486
 
491
 
487
# mount logical volumes if 'automount' is given as a boot option
492
# mount logical volumes if 'automount' is given as a boot option
488
if [ "\\\$( cmdline_parameter automount )" ]; then
493
if [ "\\\$( cmdline_parameter automount )" ]; then
489
        MOUNTOPTION="rw"
494
        MOUNTOPTION="rw"
490
	FSTYPES="ext4 ext3 ext2"
495
	FSTYPES="ext4 ext3 ext2"
491
	echo "Scanning for logical volumes..."
496
	echo "Scanning for logical volumes..."
492
	if ! lvm vgscan 2>&1 | grep "No volume groups"; then
497
	if ! lvm vgscan 2>&1 | grep "No volume groups"; then
493
	    echo "Activating logical volumes ..."
498
	    echo "Activating logical volumes ..."
494
	    modprobe dm_mod >/dev/null
499
	    modprobe dm_mod >/dev/null
495
	    lvm vgchange -ay
500
	    lvm vgchange -ay
496
	    LOGICAL_VOLUMES=\\\`lvm lvdisplay -c | sed "s/^  *//" | cut -d: -f1\\\`
501
	    LOGICAL_VOLUMES=\\\`lvm lvdisplay -c | sed "s/^  *//" | cut -d: -f1\\\`
497
	    if [ ! -z "\\\$LOGICAL_VOLUMES" ]; then
502
	    if [ ! -z "\\\$LOGICAL_VOLUMES" ]; then
498
		echo "Making device nodes ..."
503
		echo "Making device nodes ..."
499
		lvm vgmknodes
504
		lvm vgmknodes
500
		echo -n "Mounting logical volumes ... "
505
		echo -n "Mounting logical volumes ... "
501
		for VOLUME_NAME in \\\$LOGICAL_VOLUMES; do
506
		for VOLUME_NAME in \\\$LOGICAL_VOLUMES; do
502
		    VG_NAME=\\\`echo \\\$VOLUME_NAME | cut -d/ -f3\\\`
507
		    VG_NAME=\\\`echo \\\$VOLUME_NAME | cut -d/ -f3\\\`
503
		    LV_NAME=\\\`echo \\\$VOLUME_NAME | cut -d/ -f4\\\`
508
		    LV_NAME=\\\`echo \\\$VOLUME_NAME | cut -d/ -f4\\\`
504
		    MOUNTPOINT="/mnt/lvm/\\\${VG_NAME}-\\\${LV_NAME}"
509
		    MOUNTPOINT="/mnt/lvm/\\\${VG_NAME}-\\\${LV_NAME}"
505
		    mkdir -p \\\$MOUNTPOINT
510
		    mkdir -p \\\$MOUNTPOINT
506
 
511
 
507
		    MOUNTED=FALSE
512
		    MOUNTED=FALSE
508
		    for FSTYPE in \\\$FSTYPES; do
513
		    for FSTYPE in \\\$FSTYPES; do
509
			if mount -o \\\$MOUNTOPTION -t \\\$FSTYPE \\\$VOLUME_NAME \\\$MOUNTPOINT &>/dev/null; then
514
			if mount -o \\\$MOUNTOPTION -t \\\$FSTYPE \\\$VOLUME_NAME \\\$MOUNTPOINT &>/dev/null; then
510
			    echo "\\\$VOLUME_NAME \\\$MOUNTPOINT \\\$FSTYPE defaults,\\\${MOUNTOPTION} 0 0" >> /etc/fstab
515
			    echo "\\\$VOLUME_NAME \\\$MOUNTPOINT \\\$FSTYPE defaults,\\\${MOUNTOPTION} 0 0" >> /etc/fstab
511
			    echo -n "\\\$VOLUME_NAME "
516
			    echo -n "\\\$VOLUME_NAME "
512
			    MOUNTED=TRUE
517
			    MOUNTED=TRUE
513
			    CreateDesktopIconLVM
518
			    CreateDesktopIconLVM
514
			    break
519
			    break
515
			fi
520
			fi
516
		    done
521
		    done
517
		    [ \\\$MOUNTED = FALSE ] && rmdir \\\$MOUNTPOINT
522
		    [ \\\$MOUNTED = FALSE ] && rmdir \\\$MOUNTPOINT
518
		done
523
		done
519
		echo
524
		echo
520
 
525
 
521
	    else
526
	    else
522
		echo "No logical volumes found"
527
		echo "No logical volumes found"
523
	    fi
528
	    fi
524
	fi
529
	fi
525
fi
530
fi
526
 
531
 
527
### give back ownership to the default user
532
### give back ownership to the default user
528
chown -R \\\$LIVECD_USER:\\\$LIVECD_USER /home/\\\$LIVECD_USER
533
chown -R \\\$LIVECD_USER:\\\$LIVECD_USER /home/\\\$LIVECD_USER
529
 
534
 
530
EOF_initscript
535
EOF_initscript
531
#***********************************************************************
536
#***********************************************************************
532
# End of livesys script
537
# End of livesys script
533
#***********************************************************************
538
#***********************************************************************
534
 
539
 
535
 
540
 
536
#***********************************************************************
541
#***********************************************************************
537
# Create the livesys init script - /etc/rc.d/init.d/livesys-late
542
# Create the livesys init script - /etc/rc.d/init.d/livesys-late
538
#***********************************************************************
543
#***********************************************************************
539
 
544
 
540
echo "Creating the livesys init script - livesys-late"
545
echo "Creating the livesys init script - livesys-late"
541
 
546
 
542
cat > /etc/rc.d/init.d/livesys-late << EOF_lateinitscript
547
cat > /etc/rc.d/init.d/livesys-late << EOF_lateinitscript
543
#!/bin/bash
548
#!/bin/bash
544
#
549
#
545
# live: Late init script for live image
550
# live: Late init script for live image
546
#
551
#
547
# chkconfig: 345 99 01
552
# chkconfig: 345 99 01
548
# description: Late init script for live image.
553
# description: Late init script for live image.
549
 
554
 
550
. /etc/init.d/functions
555
. /etc/init.d/functions
551
. /etc/livesys.conf
556
. /etc/livesys.conf
552
. /etc/init.d/livesys.functions
557
. /etc/init.d/livesys.functions
553
 
558
 
554
# exit if not running from LiveCD
559
# exit if not running from LiveCD
555
if [ ! "\\\$( cmdline_parameter liveimg )" ] || [ "\\\$1" != "start" ]; then
560
if [ ! "\\\$( cmdline_parameter liveimg )" ] || [ "\\\$1" != "start" ]; then
556
    exit 0
561
    exit 0
557
fi
562
fi
558
 
563
 
559
touch /.liveimg-late-configured
564
touch /.liveimg-late-configured
560
 
565
 
561
# read boot parameters out of /proc/cmdline
566
# read boot parameters out of /proc/cmdline
562
ks=\\\$( cmdline_value ks )
567
ks=\\\$( cmdline_value ks )
563
xdriver=\\\$( cmdline_value xdriver )
568
xdriver=\\\$( cmdline_value xdriver )
564
kb=\\\$( cmdline_value kb )
569
kb=\\\$( cmdline_value kb )
565
 
570
 
566
# if liveinst or textinst is given, start anaconda
571
# if liveinst or textinst is given, start anaconda
567
if [ "\\\$( cmdline_parameter liveinst )" ]; then
572
if [ "\\\$( cmdline_parameter liveinst )" ]; then
568
   plymouth --quit
573
   plymouth --quit
569
   /usr/sbin/liveinst \\\$ks
574
   /usr/sbin/liveinst \\\$ks
570
   /sbin/reboot
575
   /sbin/reboot
571
fi
576
fi
572
if [ "\\\$( cmdline_parameter textinst )" ] ; then
577
if [ "\\\$( cmdline_parameter textinst )" ] ; then
573
   plymouth --quit
578
   plymouth --quit
574
   /usr/sbin/liveinst --text \\\$ks
579
   /usr/sbin/liveinst --text \\\$ks
575
   /sbin/reboot
580
   /sbin/reboot
576
fi
581
fi
577
 
582
 
578
# configure X, allowing user to override xdriver 
583
# configure X, allowing user to override xdriver 
579
# (does not work in SL6 with xorg 7.4)
584
# (does not work in SL6 with xorg 7.4)
580
# if [ -n "\\\$xdriver" ]; then
585
# if [ -n "\\\$xdriver" ]; then
581
#   cat > /etc/X11/xorg.conf.d/00-xdriver.conf <<FOE
586
#   cat > /etc/X11/xorg.conf.d/00-xdriver.conf <<FOE
582
# Section "Device"
587
# Section "Device"
583
#        Identifier      "Videocard0"
588
#        Identifier      "Videocard0"
584
#        Driver          "\\\$xdriver"
589
#        Driver          "\\\$xdriver"
585
# EndSection
590
# EndSection
586
# FOE
591
# FOE
587
# fi
592
# fi
588
 
593
 
589
# configure X, allowing user to override xdriver
594
# configure X, allowing user to override xdriver
590
# (does not work in SL6 because system-config-display is missing)
595
# (does not work in SL6 because system-config-display is missing)
591
if [ -n "\\\$xdriver" ]; then
596
if [ -n "\\\$xdriver" ]; then
592
   exists system-config-display --noui --reconfig --set-depth=24 \\\$xdriver
597
   exists system-config-display --noui --reconfig --set-depth=24 \\\$xdriver
593
fi
598
fi
594
 
599
 
595
# configure keyboard
600
# configure keyboard
596
# (does not work in SL6 because system-config-keyboard is missing)
601
# (does not work in SL6 because system-config-keyboard is missing)
597
if [ "\\\$kb" ]; then
602
if [ "\\\$kb" ]; then
598
    exists system-config-keyboard --noui \\\$kb 
603
    exists system-config-keyboard --noui \\\$kb 
599
fi
604
fi
600
 
605
 
-
 
606
# Fix the "liveinst doesn't start in gui mode when not enough memory available" - switching to terminal mode
-
 
607
sed -i "s/Terminal=false/Terminal=true/" /home/$LIVECD_USER/Desktop/liveinst.desktop
601
 
608
 
602
EOF_lateinitscript
609
EOF_lateinitscript
603
#***********************************************************************
610
#***********************************************************************
604
# End of livesys-late script
611
# End of livesys-late script
605
#***********************************************************************
612
#***********************************************************************
606
 
613
 
607
 
614
 
608
#***********************************************************************
615
#***********************************************************************
609
# Create /sbin/halt.local
616
# Create /sbin/halt.local
610
#***********************************************************************
617
#***********************************************************************
611
 
618
 
612
echo "Creating /sbin/halt.local"
619
echo "Creating /sbin/halt.local"
613
 
620
 
614
cat > /sbin/halt.local << EOF_haltlocal
621
cat > /sbin/halt.local << EOF_haltlocal
615
#!/bin/bash
622
#!/bin/bash
616
#
623
#
617
# Ejects LiveCD/DVD, if boot parameter eject is given 
624
# Ejects LiveCD/DVD, if boot parameter eject is given 
618
#
625
#
619
 
626
 
620
. /etc/init.d/functions
627
. /etc/init.d/functions
621
. /etc/livesys.conf
628
. /etc/livesys.conf
622
. /etc/init.d/livesys.functions
629
. /etc/init.d/livesys.functions
623
 
630
 
624
# exit if not running from LiveCD
631
# exit if not running from LiveCD
625
if [ ! "\\\$( cmdline_parameter liveimg )" ]; then
632
if [ ! "\\\$( cmdline_parameter liveimg )" ]; then
626
    exit 0
633
    exit 0
627
fi
634
fi
628
if [ "\\\$( cmdline_parameter eject )" ]; then
635
if [ "\\\$( cmdline_parameter eject )" ]; then
629
    echo "Eject CD/DVD ..."
636
    echo "Eject CD/DVD ..."
630
    /usr/sbin/eject -p -m \\\$(readlink -f /dev/live) >/dev/null 2>&1
637
    /usr/sbin/eject -p -m \\\$(readlink -f /dev/live) >/dev/null 2>&1
631
fi
638
fi
632
 
639
 
633
EOF_haltlocal
640
EOF_haltlocal
634
#***********************************************************************
641
#***********************************************************************
635
# End of /sbin/halt.local script
642
# End of /sbin/halt.local script
636
#***********************************************************************
643
#***********************************************************************
637
chmod 755 /sbin/halt.local
644
chmod 755 /sbin/halt.local
638
 
645
 
639
 
646
 
640
#***********************************************************************
647
#***********************************************************************
641
# Configure the LiveCD
648
# Configure the LiveCD
642
# Everything configured here will survive LiveCD install to harddisk !
649
# Everything configured here will survive LiveCD install to harddisk !
643
#***********************************************************************
650
#***********************************************************************
644
 
651
 
645
echo "Configure the LiveCD"
652
echo "Configure the LiveCD"
646
 
653
 
647
chmod 755 /etc/rc.d/init.d/livesys
654
chmod 755 /etc/rc.d/init.d/livesys
648
/sbin/restorecon /etc/rc.d/init.d/livesys
655
/sbin/restorecon /etc/rc.d/init.d/livesys
649
/sbin/chkconfig --add livesys
656
/sbin/chkconfig --add livesys
650
 
657
 
651
chmod 755 /etc/rc.d/init.d/livesys-late
658
chmod 755 /etc/rc.d/init.d/livesys-late
652
/sbin/restorecon /etc/rc.d/init.d/livesys-late
659
/sbin/restorecon /etc/rc.d/init.d/livesys-late
653
/sbin/chkconfig --add livesys-late
660
/sbin/chkconfig --add livesys-late
654
 
661
 
655
# go ahead and pre-make the man -k cache (#455968)
662
# go ahead and pre-make the man -k cache (#455968)
656
/usr/sbin/makewhatis -w
663
/usr/sbin/makewhatis -w
657
 
664
 
658
# save a little bit of space at least...
665
# save a little bit of space at least...
659
rm -f /var/lib/rpm/__db*
666
rm -f /var/lib/rpm/__db*
660
rm -f /boot/initrd*
667
rm -f /boot/initrd*
661
rm -f /boot/initramfs*
668
rm -f /boot/initramfs*
662
# make sure there aren't core files lying around
669
# make sure there aren't core files lying around
663
rm -f /core*
670
rm -f /core*
664
 
671
 
665
# convince readahead not to collect
672
# convince readahead not to collect
666
rm -f /.readahead_collect
673
rm -f /.readahead_collect
667
touch /var/lib/readahead/early.sorted
674
touch /var/lib/readahead/early.sorted
668
 
675
 
669
# workaround clock syncing on shutdown that we don't want (#297421)
676
# workaround clock syncing on shutdown that we don't want (#297421)
670
sed -i -e 's/hwclock/no-such-hwclock/g' /etc/rc.d/init.d/halt
677
sed -i -e 's/hwclock/no-such-hwclock/g' /etc/rc.d/init.d/halt
671
 
678
 
672
# import RPM GPG keys
679
# import RPM GPG keys
673
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
680
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
674
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
681
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
675
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-sl6
682
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-sl6
676
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-dawson
683
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-dawson
677
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-sl
684
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-sl
678
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
685
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
679
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-atrpms
686
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-atrpms
680
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
687
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org
681
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
688
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
682
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
689
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
683
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-fabian
690
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-fabian
684
 
691
 
685
# email_launcher in gnome panel points to evolution (sorry for the bad hack)
692
# email_launcher in gnome panel points to thunderbird - display info if thunderbird is not installed
686
if [ ! -e /usr/bin/evolution ]; then
-
 
687
   if [ -e /usr/bin/thunderbird ]; then
693
if [ ! -e /usr/bin/thunderbird ]; then
688
      # start thunderbird instead of evolution
-
 
689
      ln -s /usr/bin/thunderbird /usr/bin/evolution
-
 
690
   else
-
 
691
      # display info
-
 
692
      echo 'zenity --info --text "Evolution email client is not installed"' > /usr/bin/evolution
694
    echo 'zenity --info --text "Thunderbird email client is not installed"' > /usr/bin/thunderbird
693
      chmod 755 /usr/bin/evolution
695
    chmod 755 /usr/bin/thunderbird
694
   fi
-
 
695
fi
696
fi
696
 
697
 
697
# clean up yum
698
# clean up yum
698
yum clean all
699
yum clean all
699
 
700
 
700
# workaround avahi segfault (#279301)
701
# workaround avahi segfault (#279301)
701
touch /etc/resolv.conf
702
touch /etc/resolv.conf
702
/sbin/restorecon /etc/resolv.conf
703
/sbin/restorecon /etc/resolv.conf
703
 
704
 
704
# create locate db
705
# create locate db
705
/etc/cron.daily/mlocate.cron
706
/etc/cron.daily/mlocate.cron
706
 
707
 
707
# list kernel just for debugging
708
# list kernel just for debugging
708
rpm -q kernel
709
rpm -q kernel
709
 
710
 
710
EOF_post
711
EOF_post
711
 
712
 
712
# run post-install script
713
# run post-install script
713
/bin/bash -x /root/post-install 2>&1 | tee /root/post-install.log
714
/bin/bash -x /root/post-install 2>&1 | tee /root/post-install.log
714
 
715
 
715
%end
716
%end
716
 
717
 
717
 
718
 
718
########################################################################
719
########################################################################
719
#
720
#
720
#  LiveCD post no chroot install 
721
#  LiveCD post no chroot install 
721
#
722
#
722
########################################################################
723
########################################################################
723
%post --nochroot
724
%post --nochroot
724
 
725
 
725
#***********************************************************************
726
#***********************************************************************
726
# Create /root/postnochroot-install
727
# Create /root/postnochroot-install
727
# Must change "$" to "\$" and "`" to "\`" to avoid shell quoting
728
# Must change "$" to "\$" and "`" to "\`" to avoid shell quoting
728
#***********************************************************************
729
#***********************************************************************
729
 
730
 
730
cat > /root/postnochroot-install << EOF_postnochroot
731
cat > /root/postnochroot-install << EOF_postnochroot
731
#!/bin/bash
732
#!/bin/bash
732
 
733
 
733
# Copy licensing information
734
# Copy licensing information
734
cp $INSTALL_ROOT/usr/share/doc/*-release-*/GPL $LIVE_ROOT/GPL
735
cp $INSTALL_ROOT/usr/share/doc/*-release-*/GPL $LIVE_ROOT/GPL
735
 
736
 
736
# customize boot menu entries
737
# customize boot menu entries
737
grep -B4 'menu default'            \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/default.txt
738
grep -B4 'menu default'            \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/default.txt
738
grep -B3 'xdriver=vesa nomodeset'  \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/basicvideo.txt
739
grep -B3 'xdriver=vesa nomodeset'  \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/basicvideo.txt
739
grep -A3 'label check0'            \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/check.txt
740
grep -A3 'label check0'            \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/check.txt
740
grep -A2 'label memtest'           \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/memtest.txt
741
grep -A2 'label memtest'           \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/memtest.txt
741
grep -A2 'label local'             \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/localboot.txt
742
grep -A2 'label local'             \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/localboot.txt
742
 
743
 
743
sed "s/label linux0/label linuxtext0/"   \$LIVE_ROOT/isolinux/default.txt > \$LIVE_ROOT/isolinux/textboot.txt
744
sed "s/label linux0/label linuxtext0/"   \$LIVE_ROOT/isolinux/default.txt > \$LIVE_ROOT/isolinux/textboot.txt
744
sed -i "s/Boot/Boot (Text Mode)/"                                           \$LIVE_ROOT/isolinux/textboot.txt
745
sed -i "s/Boot/Boot (Text Mode)/"                                           \$LIVE_ROOT/isolinux/textboot.txt
745
sed -i "s/liveimg/liveimg 3/"                                               \$LIVE_ROOT/isolinux/textboot.txt
746
sed -i "s/liveimg/liveimg 3/"                                               \$LIVE_ROOT/isolinux/textboot.txt
746
sed -i "/menu default/d"                                                    \$LIVE_ROOT/isolinux/textboot.txt
747
sed -i "/menu default/d"                                                    \$LIVE_ROOT/isolinux/textboot.txt
747
 
748
 
748
sed "s/label linux0/label install0/"     \$LIVE_ROOT/isolinux/default.txt > \$LIVE_ROOT/isolinux/install.txt
749
sed "s/label linux0/label install0/"     \$LIVE_ROOT/isolinux/default.txt > \$LIVE_ROOT/isolinux/install.txt
749
sed -i "s/Boot/Install/"                                                    \$LIVE_ROOT/isolinux/install.txt
750
sed -i "s/Boot/Install/"                                                    \$LIVE_ROOT/isolinux/install.txt
750
sed -i "s/liveimg/liveimg liveinst noswap/"                                 \$LIVE_ROOT/isolinux/install.txt
751
sed -i "s/liveimg/liveimg liveinst noswap/"                                 \$LIVE_ROOT/isolinux/install.txt
751
sed -i "s/ quiet / /"                                                       \$LIVE_ROOT/isolinux/install.txt
752
sed -i "s/ quiet / /"                                                       \$LIVE_ROOT/isolinux/install.txt
752
sed -i "s/ rhgb / /"                                                        \$LIVE_ROOT/isolinux/install.txt
753
sed -i "s/ rhgb / /"                                                        \$LIVE_ROOT/isolinux/install.txt
753
sed -i "/menu default/d"                                                    \$LIVE_ROOT/isolinux/install.txt
754
sed -i "/menu default/d"                                                    \$LIVE_ROOT/isolinux/install.txt
754
 
755
 
755
sed "s/label linux0/label textinstall0/" \$LIVE_ROOT/isolinux/default.txt > \$LIVE_ROOT/isolinux/textinstall.txt
756
sed "s/label linux0/label textinstall0/" \$LIVE_ROOT/isolinux/default.txt > \$LIVE_ROOT/isolinux/textinstall.txt
756
sed -i "s/Boot/Install (Text Mode)/"                                        \$LIVE_ROOT/isolinux/textinstall.txt
757
sed -i "s/Boot/Install (Text Mode)/"                                        \$LIVE_ROOT/isolinux/textinstall.txt
757
sed -i "s/liveimg/liveimg textinst noswap/"                                 \$LIVE_ROOT/isolinux/textinstall.txt
758
sed -i "s/liveimg/liveimg textinst noswap/"                                 \$LIVE_ROOT/isolinux/textinstall.txt
758
sed -i "s/ quiet / /"                                                       \$LIVE_ROOT/isolinux/textinstall.txt
759
sed -i "s/ quiet / /"                                                       \$LIVE_ROOT/isolinux/textinstall.txt
759
sed -i "s/ rhgb / /"                                                        \$LIVE_ROOT/isolinux/textinstall.txt
760
sed -i "s/ rhgb / /"                                                        \$LIVE_ROOT/isolinux/textinstall.txt
760
sed -i "/menu default/d"                                                    \$LIVE_ROOT/isolinux/textinstall.txt
761
sed -i "/menu default/d"                                                    \$LIVE_ROOT/isolinux/textinstall.txt
761
 
762
 
762
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
763
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
763
 
764
 
764
diff \$LIVE_ROOT/isolinux/isolinux.cfg \$LIVE_ROOT/isolinux/current.txt | sed '/^[0-9][0-9]*/d; s/^. //; /^---$/d' > \$LIVE_ROOT/isolinux/cleaned.txt
765
diff \$LIVE_ROOT/isolinux/isolinux.cfg \$LIVE_ROOT/isolinux/current.txt | sed '/^[0-9][0-9]*/d; s/^. //; /^---$/d' > \$LIVE_ROOT/isolinux/cleaned.txt
765
 
766
 
766
cat \$LIVE_ROOT/isolinux/cleaned.txt      \
767
cat \$LIVE_ROOT/isolinux/cleaned.txt      \
767
    \$LIVE_ROOT/isolinux/default.txt      \
768
    \$LIVE_ROOT/isolinux/default.txt      \
768
    \$LIVE_ROOT/isolinux/textboot.txt     \
769
    \$LIVE_ROOT/isolinux/textboot.txt     \
769
    \$LIVE_ROOT/isolinux/basicvideo.txt   \
770
    \$LIVE_ROOT/isolinux/basicvideo.txt   \
770
    \$LIVE_ROOT/isolinux/check.txt        \
771
    \$LIVE_ROOT/isolinux/check.txt        \
771
    \$LIVE_ROOT/isolinux/install.txt      \
772
    \$LIVE_ROOT/isolinux/install.txt      \
772
    \$LIVE_ROOT/isolinux/textinstall.txt  \
773
    \$LIVE_ROOT/isolinux/textinstall.txt  \
773
    \$LIVE_ROOT/isolinux/memtest.txt      \
774
    \$LIVE_ROOT/isolinux/memtest.txt      \
774
    \$LIVE_ROOT/isolinux/localboot.txt > \$LIVE_ROOT/isolinux/isolinux.cfg
775
    \$LIVE_ROOT/isolinux/localboot.txt > \$LIVE_ROOT/isolinux/isolinux.cfg
775
rm -f \$LIVE_ROOT/isolinux/*.txt
776
rm -f \$LIVE_ROOT/isolinux/*.txt
776
 
777
 
777
# EFI/BOOT directory should be in small letters EFI/boot (bug)
778
# EFI/BOOT directory should be in small letters EFI/boot (bug)
778
mv -v \$LIVE_ROOT/EFI/BOOT \$LIVE_ROOT/EFI/boot
779
mv -v \$LIVE_ROOT/EFI/BOOT \$LIVE_ROOT/EFI/boot
779
 
780
 
780
# Forcing plymouth to show the logo in vesafb
781
# Forcing plymouth to show the logo in vesafb
781
sed -i "s/rhgb/rhgb vga=791/g" \$LIVE_ROOT/isolinux/isolinux.cfg
782
sed -i "s/rhgb/rhgb vga=791/g" \$LIVE_ROOT/isolinux/isolinux.cfg
782
 
783
 
783
# change selection bar background color to Gray-50%
784
# change selection bar background color to Gray-50%
784
sed -i "s/menu color sel 7.*/menu color sel 7 #ffffffff #ff808080/" \$LIVE_ROOT/isolinux/isolinux.cfg 
785
sed -i "s/menu color sel 7.*/menu color sel 7 #ffffffff #ff808080/" \$LIVE_ROOT/isolinux/isolinux.cfg 
785
 
786
 
786
EOF_postnochroot
787
EOF_postnochroot
787
 
788
 
788
# run postnochroot-install script
789
# run postnochroot-install script
789
/bin/bash -x /root/postnochroot-install 2>&1 | tee /root/postnochroot-install.log
790
/bin/bash -x /root/postnochroot-install 2>&1 | tee /root/postnochroot-install.log
790
 
791
 
791
%end
792
%end
792
 
793