Subversion Repositories livecd

Rev

Rev 272 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 272 Rev 273
Line 89... Line 89...
89
@nfs-file-server
89
@nfs-file-server
90
@openafs-client
90
@openafs-client
91
@php
91
@php
92
@postgresql-client
92
@postgresql-client
93
@scalable-file-systems
93
@scalable-file-systems
94
#@storage-client-fcoe
94
# @storage-client-fcoe
95
@storage-client-iscsi
95
@storage-client-iscsi
96
@storage-client-multipath
96
@storage-client-multipath
97
#@system-management-messaging-client
-
 
98
#@system-management-messaging-server
-
 
99
@system-management-snmp
97
@system-management-snmp
-
 
98
# @system-management-messaging-client
-
 
99
# @system-management-messaging-server
100
#@system-management-wbem
100
# @system-management-wbem
101
#@turbogears
101
# @turbogears
102
@virtualization
102
# @virtualization
103
@virtualization-client
103
# @virtualization-client
104
@virtualization-platform
104
# @virtualization-platform
105
@virtualization-tools
105
# @virtualization-tools
106
 
106
 
107
# Add support for your prefered language here
107
# Add support for your prefered language here
108
@french-support
108
@french-support
109
@german-support
109
@german-support
110
@russian-support
110
@russian-support
Line 130... Line 130...
130
cat > /etc/livesys.conf << 'EOF_livesysconf'
130
cat > /etc/livesys.conf << 'EOF_livesysconf'
131
###--------------------------------------------------------------------
131
###--------------------------------------------------------------------
132
### Configuration file for LiveCD
132
### Configuration file for LiveCD
133
###--------------------------------------------------------------------
133
###--------------------------------------------------------------------
134
 
134
 
135
## default LiveCD user
135
# default LiveCD user
136
LIVECD_DEF_USER="sluser"
136
LIVECD_DEF_USER="sluser"
137
 
137
 
138
# delay in sec. before auto login
138
# delay in sec. before auto login
139
LOGIN_DELAY=15
139
LOGIN_DELAY=15
140
 
140
 
-
 
141
# Services which are off (not running) on the LiveCD
-
 
142
SERVICES_OFF="mdmonitor setroubleshoot auditd crond atd readahead_early \
-
 
143
              readahead_later kdump microcode_ctl openct pcscd postfix"
-
 
144
 
141
EOF_livesysconf
145
EOF_livesysconf
142
 
146
 
143
 
147
 
144
cat > /etc/init.d/livesys.functions << 'EOF_livesysfunctions'
148
cat > /etc/init.d/livesys.functions << 'EOF_livesysfunctions'
145
###--------------------------------------------------------------------
149
###--------------------------------------------------------------------
Line 207... Line 211...
207
fi
211
fi
208
 
212
 
209
touch /.liveimg-configured
213
touch /.liveimg-configured
210
 
214
 
211
# read boot parameters out of /proc/cmdline
215
# read boot parameters out of /proc/cmdline
212
hostname=\\\$( cmdline_value hostanme )
216
hostname=\\\$( cmdline_value hostname )
-
 
217
CELL=\\\$( cmdline_value cell )
-
 
218
SERVICEON=\\\$( cmdline_value serviceon )
-
 
219
SERVICEOFF=\\\$( cmdline_value serviceoff )
213
 
220
 
214
# set livecd user
221
# set livecd user
215
LIVECD_USER=\\\$( cmdline_value user )
222
LIVECD_USER=\\\$( cmdline_value user )
216
[ ! "\\\$LIVECD_USER" ] && LIVECD_USER=\\\$LIVECD_DEF_USER
223
[ ! "\\\$LIVECD_USER" ] && LIVECD_USER=\\\$LIVECD_DEF_USER
217
 
224
 
Line 301... Line 308...
301
mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum
308
mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum
302
mount -t tmpfs tmp /tmp
309
mount -t tmpfs tmp /tmp
303
mount -t tmpfs vartmp /var/tmp
310
mount -t tmpfs vartmp /var/tmp
304
[ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /tmp /var/tmp >/dev/null 2>&1
311
[ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /tmp /var/tmp >/dev/null 2>&1
305
 
312
 
-
 
313
# turn off services, which are not useful on LiveCD, to preserve resources
-
 
314
if [ "\\\$SERVICE_OFF" ]; then
-
 
315
    for service in \\\$SERVICE_OFF ; do
-
 
316
        [ -f /etc/init.d/\\\$service ] && chkconfig \\\$service off 2>/dev/null
-
 
317
    done
-
 
318
fi
-
 
319
 
-
 
320
# services off, from command line paramter
-
 
321
if [ "\\\$SERVICEOFF" ]; then
-
 
322
    for service in \\\$( echo "\\\$SERVICEOFF" | tr ':' ' ' ); do
-
 
323
        [ -f /etc/init.d/\\\$service ] && chkconfig \\\$service off 2>/dev/null
-
 
324
    done
-
 
325
fi
-
 
326
 
-
 
327
# services on, from command line paramter
-
 
328
if [ "\\\$SERVICEON" ]; then
-
 
329
    for service in \\\$( echo "\\\$SERVICEON" | tr ':' ' ' ); do
-
 
330
        [ -f /etc/init.d/\\\$service ] && chkconfig \\\$service on  2>/dev/null
-
 
331
    done
-
 
332
fi
-
 
333
 
-
 
334
# set afs cell if given by boot parameter
-
 
335
[ "\\\$CELL" ] && echo \\\$CELL > /usr/vice/etc/ThisCell
-
 
336
 
-
 
337
# set the LiveCD hostname
-
 
338
[ ! "\\\$hostname" ] && hostname="livecd.localdomain"
-
 
339
sed -i -e "s|HOSTNAME=.*|HOSTNAME=\\\$hostname|g" /etc/sysconfig/network
-
 
340
/bin/hostname \\\$hostname
-
 
341
 
-
 
342
 
-
 
343
###################################################
-
 
344
# EXIT here if LiveCD has already been configured #
-
 
345
###################################################
306
if [ -n "\\\$configdone" ]; then
346
if [ -n "\\\$configdone" ]; then
307
  exit 0
347
  exit 0
308
fi
348
fi
309
 
349
 
310
## fix various bugs and issues
350
## fix various bugs and issues
Line 312... Line 352...
312
exists alsaunmute 0 2> /dev/null
352
exists alsaunmute 0 2> /dev/null
313
 
353
 
314
# turn off firstboot for livecd boots
354
# turn off firstboot for livecd boots
315
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
355
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
316
 
356
 
317
# turn off services, which are not useful on LiveCD, to preserve resources
-
 
318
chkconfig mdmonitor       off 2>/dev/null
-
 
319
chkconfig setroubleshoot  off 2>/dev/null
-
 
320
chkconfig auditd          off 2>/dev/null
-
 
321
chkconfig crond           off 2>/dev/null
-
 
322
chkconfig atd             off 2>/dev/null
-
 
323
chkconfig readahead_early off 2>/dev/null
-
 
324
chkconfig readahead_later off 2>/dev/null
-
 
325
chkconfig kdump           off 2>/dev/null
-
 
326
chkconfig microcode_ctl   off 2>/dev/null
-
 
327
chkconfig openct          off 2>/dev/null
-
 
328
chkconfig pcscd           off 2>/dev/null
-
 
329
chkconfig postfix         off 2>/dev/null
-
 
330
 
-
 
331
# start afs with option -memcache (is this correct?)
357
# start afs with option -memcache (is this correct?)
332
[ -e /etc/sysconfig/afs ] && sed -i "s|^OPTIONS=.*|OPTIONS=\"-memcache\"|" /etc/sysconfig/afs
358
[ -e /etc/sysconfig/afs ] && sed -i "s|^OPTIONS=.*|OPTIONS=\"-memcache\"|" /etc/sysconfig/afs
333
 
359
 
334
# Stopgap fix for RH #217966; should be fixed in HAL instead
360
# Stopgap fix for RH #217966; should be fixed in HAL instead
335
touch /media/.hal-mtab
361
touch /media/.hal-mtab
336
 
362
 
337
# set the LiveCD hostname
-
 
338
[ ! "\\\$hostname" ] && hostname="livecd.localdomain"
-
 
339
sed -i -e 's/HOSTNAME=localhost.localdomain/HOSTNAME=\\\$hostname/g' /etc/sysconfig/network
-
 
340
/bin/hostname \\\$hostname
-
 
341
 
-
 
342
## create the LiveCD default user
363
## create the LiveCD default user
343
# add default user with no password
364
# add default user with no password
344
/usr/sbin/useradd -c "LiveCD default user" \\\$LIVECD_USER
365
/usr/sbin/useradd -c "LiveCD default user" \\\$LIVECD_USER
345
/usr/bin/passwd -d \\\$LIVECD_USER > /dev/null
366
/usr/bin/passwd -d \\\$LIVECD_USER > /dev/null
346
# give default user sudo privileges
367
# give default user sudo privileges