blob: bfb937a16f6c3be7e3185e47061da0ba3f8de4cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
#!/bin/bash
# livecd configuration for Fedora GNOME
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
case $1 in
# inquire what packages to install; must print packages to install
pkgadd)
echo "
chkconfig
gdm
gnome-panel
nautilus
metacity
gnome-themes
redhat-artwork
gnome-power-manager
gnome-volume-manager
desktop-printing
gnome-terminal
gedit
NetworkManager-gnome
NetworkManager-vpnc
NetworkManager-openvpn
xorg-x11-drivers
yelp
eog
firefox
totem
totem-mozplugin
gnome-session
system-config-display
vim-minimal
vim-X11
gnome-applets
compiz
gucharmap
gcalctool
file-roller
gnome-utils
gconf-editor
evince
nautilus-open-terminal
gnome-bluetooth
pirut
setroubleshoot
gnome-python2-canvas
alacarte
system-config-date
system-config-users
system-config-rootpassword
system-config-printer
yum-updatesd
ntfs-3g
ntfsprogs
alsa-utils
dejavu-lgc-fonts
"
;;
# run configuration scripts when all packages are installed
post)
perl -i -p -e 's/id:3:initdefault:/id:5:initdefault:/' /etc/inittab
chkconfig --level 345 network off
chkconfig --level 345 NetworkManager on
cat > /etc/init.d/livecd <<EOF
#!/bin/bash
#
# livecd: Init script for live cd
#
# chkconfig: 345 00 99
# description: Init script for live cd.
. /etc/init.d/functions
if ! strstr "\`cat /proc/cmdline\`" livecd || [ "\$1" != "start" ] || [ -e /.livecd-configured ] ; then
exit 0
fi
touch /.livecd-configured
# mount livecd
mkdir -p /mnt/livecd
mount -o ro -t iso9660 /dev/livecd /mnt/livecd
# configure X
system-config-display --noui --reconfig --set-depth=24
# unmute sound card
alsaunmute 0 2> /dev/null
# add fedora user with no passwd
useradd -c "Fedora live CD" fedora
passwd -d fedora > /dev/null
# make fedora user use GNOME (TODO: make gdm DTRT instead of this hack)
echo "gnome-session" > /home/fedora/.xsession
chmod a+x /home/fedora/.xsession
chown fedora:fedora /home/fedora/.xsession
if [ -e /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png ] ; then
cp /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png /home/fedora/.face
chown fedora:fedora /home/fedora/.face
# TODO: would be nice to get e-d-s to pick this one up too... but how?
fi
# setup a11y if requested
#
# todo: support also:
# - high contrast scheme
# - magnifier
# - on-screen keyboard
# - keyboard modifiers
#
#if strstr "\`cat /proc/cmdline\`" a11y_screenreader ; then
# gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t boolean /desktop/gnome/interface/accessibility true > /dev/null
# gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t list --list-type string /desktop/gnome/accessibility/startup/exec_ats [orca] > /dev/null
# # gah, orca is _kinda_ broken; need to fix the Orca RPM package instead
# # but need to do this since login on the live CD takes a long time...
# sed -e "s/sleep 30/sleep 600/" /usr/bin/orca > /usr/bin/orca.new
# mv /usr/bin/orca.new /usr/bin/orca
# chmod a+x /usr/bin/orca
#fi
# change wallpaper to l33t livecd wallpaper
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /desktop/gnome/background/picture_filename /usr/share/backgrounds/images/fedora-livecd-wallpaper.jpg > /dev/null
# set up autologin for user fedora
echo "[daemon]" > /etc/gdm/custom.conf
echo "AutomaticLoginEnable=true" >> /etc/gdm/custom.conf
echo "AutomaticLogin=fedora" >> /etc/gdm/custom.conf
# turn off firstboot for livecd boots
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
# don't start yum-updatesd for livecd boots
chkconfig --levels 345 yum-updatesd off
# Stopgap fix for RH #217966; should be fixed in HAL instead
touch /media/.hal-mtab
EOF
chmod a+x /etc/init.d/livecd
/sbin/chkconfig --add livecd
;;
# run when an livecd install is complete to clean up
install-post)
/sbin/chkconfig --del livecd
rm -f /etc/init.d/livecd
;;
# run when an livecd install is complete; must prints packages to remove
install-pkgrem)
echo "
fedora-livecd-gnome
"
;;
esac
|