Subversion Repositories livecd

Rev

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

Rev 285 Rev 286
Line 11... Line 11...
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
repo --name=base     --baseurl=http://ftp.scientificlinux.org/linux/scientific/6rolling/$basearch/os/
16
repo --name=base      --baseurl=http://ftp.scientificlinux.org/linux/scientific/6rolling/$basearch/os/
17
repo --name=security --baseurl=http://ftp.scientificlinux.org/linux/scientific/6rolling/$basearch/updates/security/
17
repo --name=security  --baseurl=http://ftp.scientificlinux.org/linux/scientific/6rolling/$basearch/updates/security/
18
#fastbugs repo disabled per default
18
#fastbugs repo disabled per default
19
#repo --name=fastbugs  --baseurl=http://ftp.scientificlinux.org/linux/scientific/6rolling/$basearch/updates/fastbugs/
19
#repo --name=fastbugs  --baseurl=http://ftp.scientificlinux.org/linux/scientific/6rolling/$basearch/updates/fastbugs/
20
xconfig --startxonboot
20
xconfig --startxonboot
21
services --enabled=NetworkManager --disabled=network,sshd
21
services --enabled=NetworkManager --disabled=network,sshd
22
 
22
 
Line 24... Line 24...
24
########################################################################
24
########################################################################
25
#
25
#
26
# Basic software packages
26
# Basic software packages
27
#
27
#
28
########################################################################
28
########################################################################
29
 
-
 
30
%packages
29
%packages
31
syslinux
30
syslinux
32
kernel
31
kernel
33
 
32
 
34
# basic software groups
33
# basic software groups
Line 44... Line 43...
44
@remote-desktop-clients
43
@remote-desktop-clients
45
# packages added to @remote-desktop-clients
44
# packages added to @remote-desktop-clients
46
rdesktop
45
rdesktop
47
tsclient
46
tsclient
48
@x11
47
@x11
49
 
-
 
50
@openafs-client
48
@openafs-client
51
 
49
 
52
# other usefull packages
50
# other usefull packages
53
busybox
51
busybox
54
mailx
52
mailx
Line 60... Line 58...
60
device-mapper-multipath
58
device-mapper-multipath
61
isomd5sum
59
isomd5sum
62
 
60
 
63
%end
61
%end
64
 
62
 
65
 
-
 
66
########################################################################
63
########################################################################
67
#
64
#
68
#  LiveCD post install 
65
#  LiveCD post install in chroot 
69
#
66
#
70
########################################################################
67
########################################################################
71
 
-
 
72
%post
68
%post
73
 
69
 
74
########################################################################
70
#***********************************************************************
75
# LiveCD configuration file and LiveCD functions
71
# Create LiveCD configuration file and LiveCD functions
76
########################################################################
72
#***********************************************************************
77
 
73
 
78
cat > /etc/livesys.conf << 'EOF_livesysconf'
74
cat > /etc/livesys.conf << 'EOF_livesysconf'
79
###--------------------------------------------------------------------
75
#--------------------------------------------------------------------
80
### Configuration file for LiveCD
76
# Configuration file for LiveCD
81
###--------------------------------------------------------------------
77
#--------------------------------------------------------------------
82
 
78
 
83
# default LiveCD user
79
# default LiveCD user
84
LIVECD_DEF_USER="sluser"
80
LIVECD_DEF_USER="sluser"
85
 
81
 
86
# delay in sec. before auto login
82
# delay in sec. before auto login
Line 95... Line 91...
95
 
91
 
96
EOF_livesysconf
92
EOF_livesysconf
97
 
93
 
98
 
94
 
99
cat > /etc/init.d/livesys.functions << 'EOF_livesysfunctions'
95
cat > /etc/init.d/livesys.functions << 'EOF_livesysfunctions'
100
###--------------------------------------------------------------------
96
#--------------------------------------------------------------------
101
### livesys functions
97
# livesys functions
102
###--------------------------------------------------------------------
98
#--------------------------------------------------------------------
103
 
99
 
104
# egrep_o is a replacement for "egrep -o". It prints only the last matching text
100
# egrep_o is a replacement for "egrep -o". It prints only the last matching text
105
egrep_o() {
101
egrep_o() {
106
   cat | egrep "$1" | sed -r "s/.*($1).*/\\1/"
102
   cat | egrep "$1" | sed -r "s/.*($1).*/\\1/"
107
}
103
}
Line 125... Line 121...
125
}
121
}
126
 
122
 
127
EOF_livesysfunctions
123
EOF_livesysfunctions
128
 
124
 
129
 
125
 
130
 
-
 
131
########################################################################
126
#***********************************************************************
132
# Create a sub-script so the output can be captured
127
# Create /root/post-install
133
# Must change "$" to "\$" and "`" to "\`" to avoid shell quoting
128
# Must change "$" to "\$" and "`" to "\`" to avoid shell quoting
134
########################################################################
129
#***********************************************************************
135
 
130
 
136
cat > /root/post-install << EOF_post
131
cat > /root/post-install << EOF_post
137
#!/bin/bash
132
#!/bin/bash
138
 
133
 
-
 
134
#***********************************************************************
-
 
135
# Create the livesys init script - /etc/rc.d/init.d/livesys
-
 
136
#***********************************************************************
139
 
137
 
140
echo ###################################################################
-
 
141
echo ## Creating the livesys init script - livesys
138
echo "Creating the livesys init script - livesys"
142
echo ###################################################################
-
 
143
 
139
 
144
cat > /etc/rc.d/init.d/livesys << EOF_initscript
140
cat > /etc/rc.d/init.d/livesys << EOF_initscript
145
#!/bin/bash
141
#!/bin/bash
146
#
142
#
147
# live: Init script for live image
143
# live: Init script for live image
Line 289... Line 285...
289
# set the LiveCD hostname
285
# set the LiveCD hostname
290
[ ! "\\\$hostname" ] && hostname="livecd.localdomain"
286
[ ! "\\\$hostname" ] && hostname="livecd.localdomain"
291
sed -i -e "s|HOSTNAME=.*|HOSTNAME=\\\$hostname|g" /etc/sysconfig/network
287
sed -i -e "s|HOSTNAME=.*|HOSTNAME=\\\$hostname|g" /etc/sysconfig/network
292
/bin/hostname \\\$hostname
288
/bin/hostname \\\$hostname
293
 
289
 
-
 
290
#-----------------------------------------------------------------------
-
 
291
# EXIT here if LiveCD has already been configured         
-
 
292
# happens if you start the LiveCD with persistent changes 
-
 
293
#-----------------------------------------------------------------------
294
 
294
 
295
###########################################################
-
 
296
# EXIT here if LiveCD has already been configured         #
-
 
297
# happens if you start the LiveCD with persistent changes #
-
 
298
###########################################################
-
 
299
[ "\\\$configdone" ] && exit 0
295
[ "\\\$configdone" ] && exit 0
300
 
296
 
301
# turn off services, which are not useful on LiveCD, to preserve resources
297
# turn off services, which are not useful on LiveCD, to preserve resources
302
if [ "\\\$SERVICES_OFF" ]; then
298
if [ "\\\$SERVICES_OFF" ]; then
303
    for service in \\\$SERVICES_OFF ; do
299
    for service in \\\$SERVICES_OFF ; do
Line 381... Line 377...
381
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_hardware false >/dev/null
377
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_hardware false >/dev/null
382
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_codec_helper false >/dev/null
378
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_codec_helper false >/dev/null
383
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_font_helper false >/dev/null
379
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_font_helper false >/dev/null
384
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
380
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
385
 
381
 
386
# start system-config-firewall with su
382
# start system-config-firewall with su 
-
 
383
# (bugfix: system-config-firewall does not work when root has no password)
387
sed -i "s|^Exec=.*|Exec=su - -c /usr/bin/system-config-firewall|" /usr/share/applications/system-config-firewall.desktop
384
sed -i "s|^Exec=.*|Exec=su - -c /usr/bin/system-config-firewall|" /usr/share/applications/system-config-firewall.desktop
388
sed -i "s|^Terminal=.*|Terminal=true|"                         /usr/share/applications/system-config-firewall.desktop
385
sed -i "s|^Terminal=.*|Terminal=true|"                            /usr/share/applications/system-config-firewall.desktop
389
 
386
 
390
 
-
 
-
 
387
#-----------------------------------------------------------------------
391
### detecting disk partitions and logical volumes (disabled by default)
388
# detecting disk partitions and logical volumes (disabled by default)
392
### use boot parameter automount to enable it
389
# use boot parameter automount to enable it
-
 
390
#-----------------------------------------------------------------------
393
 
391
 
394
CreateDesktopIconHD()
392
CreateDesktopIconHD()
395
{
393
{
396
cat > /home/\\\$LIVECD_USER/Desktop/Local\ hard\ drives.desktop << EOF_HDicon
394
cat > /home/\\\$LIVECD_USER/Desktop/Local\ hard\ drives.desktop << EOF_HDicon
397
[Desktop Entry]
395
[Desktop Entry]
Line 509... Line 507...
509
 
507
 
510
# give back ownership to the default user
508
# give back ownership to the default user
511
chown -R \\\$LIVECD_USER:\\\$LIVECD_USER /home/\\\$LIVECD_USER
509
chown -R \\\$LIVECD_USER:\\\$LIVECD_USER /home/\\\$LIVECD_USER
512
 
510
 
513
EOF_initscript
511
EOF_initscript
514
echo ###################################################################
512
#***********************************************************************
515
echo ## End of livesys script
513
# End of livesys script
516
echo ###################################################################
514
#***********************************************************************
517
 
515
 
518
 
516
 
-
 
517
#***********************************************************************
-
 
518
# Create the livesys init script - /etc/rc.d/init.d/livesys-late
-
 
519
#***********************************************************************
519
 
520
 
520
echo ###################################################################
-
 
521
echo ## Creating the livesys init script - livesys-late
521
echo "Creating the livesys init script - livesys-late"
522
echo ###################################################################
-
 
523
 
522
 
524
cat > /etc/rc.d/init.d/livesys-late << EOF_lateinitscript
523
cat > /etc/rc.d/init.d/livesys-late << EOF_lateinitscript
525
#!/bin/bash
524
#!/bin/bash
526
#
525
#
527
# live: Late init script for live image
526
# live: Late init script for live image
Line 564... Line 563...
564
if [ "\\\$kb" ]; then
563
if [ "\\\$kb" ]; then
565
    exists system-config-keyboard --noui \\\$kb 
564
    exists system-config-keyboard --noui \\\$kb 
566
fi
565
fi
567
 
566
 
568
EOF_lateinitscript
567
EOF_lateinitscript
569
echo ###################################################################
568
#***********************************************************************
570
echo ## End of livesys-late script
569
# End of livesys-late script
571
echo ###################################################################
570
#***********************************************************************
572
 
571
 
573
 
572
 
-
 
573
#***********************************************************************
-
 
574
# Configure the LiveCD
-
 
575
# Everthing configured here will survive LiveCD install to harddisk !
-
 
576
#***********************************************************************
574
 
577
 
575
echo ###################################################################
-
 
576
echo ## Configure the LiveCD
578
echo "Configure the LiveCD"
577
echo ###################################################################
-
 
578
 
579
 
579
# workaround avahi segfault (#279301)
580
# workaround avahi segfault (#279301)
580
touch /etc/resolv.conf
581
touch /etc/resolv.conf
581
/sbin/restorecon /etc/resolv.conf
582
/sbin/restorecon /etc/resolv.conf
582
 
583
 
Line 623... Line 624...
623
# run post-install script
624
# run post-install script
624
/bin/bash -x /root/post-install 2>&1 | tee /root/post-install.log
625
/bin/bash -x /root/post-install 2>&1 | tee /root/post-install.log
625
 
626
 
626
%end
627
%end
627
########################################################################
628
########################################################################
-
 
629
#
628
# End of configure LiveCD in chroot
630
# End of configure LiveCD in chroot
-
 
631
#
629
########################################################################
632
########################################################################
630
 
633
 
631
 
634
 
632
 
-
 
633
%post --nochroot
-
 
634
########################################################################
635
########################################################################
-
 
636
#
635
# Post install in no chroot
637
#  LiveCD post no chroot install 
636
# Must change "$" to "\$" and "`" to "\`" to avoid shell quoting
-
 
-
 
638
#
637
########################################################################
639
########################################################################
-
 
640
%post --nochroot
-
 
641
 
-
 
642
#***********************************************************************
-
 
643
# Create /root/postnochroot-install
-
 
644
# Must change "$" to "\$" and "`" to "\`" to avoid shell quoting
-
 
645
#***********************************************************************
-
 
646
 
638
cat > /root/postnochroot-install << EOF_postnochroot
647
cat > /root/postnochroot-install << EOF_postnochroot
639
#!/bin/bash
648
#!/bin/bash
640
 
649
 
641
# Copy licensing information
650
# Copy licensing information
642
cp $INSTALL_ROOT/usr/share/doc/*-release-*/GPL $LIVE_ROOT/GPL
651
cp $INSTALL_ROOT/usr/share/doc/*-release-*/GPL $LIVE_ROOT/GPL
Line 684... Line 693...
684
# run postnochroot-install script
693
# run postnochroot-install script
685
/bin/bash -x /root/postnochroot-install 2>&1 | tee /root/postnochroot-install.log
694
/bin/bash -x /root/postnochroot-install 2>&1 | tee /root/postnochroot-install.log
686
 
695
 
687
%end
696
%end
688
########################################################################
697
########################################################################
-
 
698
#
689
# End of configure LiveCD in nochroot
699
# End of configure LiveCD in nochroot
-
 
700
#
690
########################################################################
701
########################################################################