Subversion Repositories livecd

Rev

Rev 393 | Rev 396 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 393 Rev 395
1
 
1
 
2
lang en_GB.UTF-8
2
lang en_GB.UTF-8
3
keyboard us
3
keyboard us
4
timezone Europe/Brussels --isUtc
4
timezone Europe/Brussels --isUtc
5
auth --useshadow --enablemd5
5
auth --useshadow --enablemd5
6
selinux --enforcing
6
selinux --enforcing
7
firewall --enabled --service=mdns
7
firewall --enabled --service=mdns
8
xconfig --startxonboot
8
xconfig --startxonboot
9
part / --size 8192 --fstype ext4
9
part / --size 8192 --fstype ext4
10
services --enabled=NetworkManager --disabled=network,sshd
10
services --enabled=NetworkManager --disabled=network,sshd
11
 
11
 
12
 
12
 
13
# Root password
13
# Root password
14
rootpw --iscrypted $6$K2nKf02kVKG68960$OywvoaViphSITuro/liKvCj7Pm/CH/xqzz/lsoXyaKSR1lYf0vHAqSUc483a9MCCBkIwfr/hNMfqwxqVO0OEg1
14
rootpw --iscrypted $6$K2nKf02kVKG68960$OywvoaViphSITuro/liKvCj7Pm/CH/xqzz/lsoXyaKSR1lYf0vHAqSUc483a9MCCBkIwfr/hNMfqwxqVO0OEg1
15
 
15
 
16
# SL repositories (fastbugs enabled per default) 
16
# SL repositories (fastbugs enabled per default) 
17
#repo --name=base      --baseurl=http://ftp.scientificlinux.org/linux/scientific/7rolling/$basearch/os/
17
#repo --name=base      --baseurl=http://ftp.scientificlinux.org/linux/scientific/7rolling/$basearch/os/
18
#repo --name=security  --baseurl=http://ftp.scientificlinux.org/linux/scientific/7rolling/$basearch/updates/security/
18
#repo --name=security  --baseurl=http://ftp.scientificlinux.org/linux/scientific/7rolling/$basearch/updates/security/
19
#repo --name=fastbugs  --baseurl=http://ftp.scientificlinux.org/linux/scientific/7rolling/$basearch/updates/fastbugs/
19
#repo --name=fastbugs  --baseurl=http://ftp.scientificlinux.org/linux/scientific/7rolling/$basearch/updates/fastbugs/
20
 
20
 
21
# or use a mirror close to you
21
# or use a mirror close to you
22
repo --name=base      --baseurl=http://mirror.switch.ch/ftp/mirror/scientificlinux/7rolling/$basearch/os/
22
repo --name=base      --baseurl=http://mirror.switch.ch/ftp/mirror/scientificlinux/7rolling/$basearch/os/
23
repo --name=security  --baseurl=http://mirror.switch.ch/ftp/mirror/scientificlinux/7rolling/$basearch/updates/security/
23
repo --name=security  --baseurl=http://mirror.switch.ch/ftp/mirror/scientificlinux/7rolling/$basearch/updates/security/
24
repo --name=fastbugs  --baseurl=http://mirror.switch.ch/ftp/mirror/scientificlinux/7rolling/$basearch/updates/fastbugs/
24
repo --name=fastbugs  --baseurl=http://mirror.switch.ch/ftp/mirror/scientificlinux/7rolling/$basearch/updates/fastbugs/
25
 
25
 
26
# epel
26
# epel
27
repo --name=epel      --baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
27
repo --name=epel      --baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
28
 
28
 
29
%packages
29
%packages
30
@base
30
@base
31
@core
31
@core
32
@dial-up
32
@dial-up
33
@directory-client
33
@directory-client
34
@fonts
34
@fonts
35
@gnome-desktop
35
@gnome-desktop
36
@guest-agents
36
@guest-agents
37
@guest-desktop-agents
37
@guest-desktop-agents
38
@input-methods
38
@input-methods
39
@internet-browser
39
@internet-browser
40
@java-platform
40
@java-platform
41
@multimedia
41
@multimedia
42
@network-file-system-client
42
@network-file-system-client
43
@print-client
43
@print-client
44
@x11
44
@x11
45
@internet-applications
45
@internet-applications
46
@office-suite
46
@office-suite
47
@gnome-apps
47
@gnome-apps
48
 
48
 
49
# additional packages
49
# additional packages
50
@backup-client
50
@backup-client
51
@compat-libraries
51
@compat-libraries
52
@development
52
@development
53
@emacs
53
@emacs
54
@graphics
54
@graphics
55
@legacy-x
55
@legacy-x
56
@network-tools
56
@network-tools
57
@performance
57
@performance
58
@perl-runtime
58
@perl-runtime
59
@php
59
@php
60
@technical-writing
60
@technical-writing
61
 
61
 
62
# console-internet
62
# console-internet
63
lftp
63
lftp
64
mutt
64
mutt
65
whois
65
whois
66
 
66
 
67
# legacy-unix
67
# legacy-unix
68
finger
68
finger
69
ksh
69
ksh
70
telnet
70
telnet
71
 
71
 
72
# network-tools
72
# network-tools
73
nmap
73
nmap
74
wireshark
74
wireshark
75
wireshark-gnome
75
wireshark-gnome
76
iptraf-ng
76
iptraf-ng
77
netsniff-ng
77
netsniff-ng
78
 
78
 
79
# scientific
79
# scientific
80
atlas
80
atlas
81
fftw
81
fftw
82
gnuplot
82
gnuplot
83
lapack
83
lapack
84
numpy
84
numpy
85
scipy
85
scipy
86
units
86
units
87
 
87
 
88
# system-admin-tools
88
# system-admin-tools
89
screen
89
screen
90
system-storage-manager
90
system-storage-manager
91
tree
91
tree
92
mc
92
mc
93
 
93
 
94
# development
94
# development
95
java-1.7rolling-openjdk-devel
95
java-1.7.0-openjdk-devel
96
 
96
 
97
# live install tools
97
# live install tools
98
anaconda
98
anaconda
99
system-config-keyboard
99
system-config-keyboard
100
firefox
100
firefox
101
 
101
 
102
# for UEFI/Secureboot support
102
# for UEFI/Secureboot support
103
grub2
103
grub2
104
grub2-efi
104
grub2-efi
105
efibootmgr
105
efibootmgr
106
shim
106
shim
107
 
107
 
108
# add yum-conf-epel 
108
# add yum-conf-epel 
109
yum-conf-epel
109
yum-conf-epel
110
 
110
 
111
# packages from epel repo
111
# packages from epel repo
112
dd_rescue
112
dd_rescue
113
ddrescue
113
ddrescue
114
fuse-sshfs
114
fuse-sshfs
115
gparted
115
gparted
116
iperf3
116
iperf3
117
NetworkManager-openvpn-gnome
117
NetworkManager-openvpn-gnome
118
ntfs-3g
118
ntfs-3g
119
ntfsprogs
119
ntfsprogs
120
 
120
 
121
%end
121
%end
122
 
122
 
123
%post
123
%post
124
# FIXME: it'd be better to get this installed from a package
124
# FIXME: it'd be better to get this installed from a package
125
cat > /etc/rc.d/init.d/livesys << EOF
125
cat > /etc/rc.d/init.d/livesys << EOF
126
#!/bin/bash
126
#!/bin/bash
127
#
127
#
128
# live: Init script for live image
128
# live: Init script for live image
129
#
129
#
130
# chkconfig: 345 00 99
130
# chkconfig: 345 00 99
131
# description: Init script for live image.
131
# description: Init script for live image.
132
### BEGIN INIT INFO
132
### BEGIN INIT INFO
133
# X-Start-Before: display-manager
133
# X-Start-Before: display-manager
134
### END INIT INFO
134
### END INIT INFO
135
 
135
 
136
. /etc/init.d/functions
136
. /etc/init.d/functions
137
 
137
 
138
if ! strstr "\`cat /proc/cmdline\`" rd.live.image || [ "\$1" != "start" ]; then
138
if ! strstr "\`cat /proc/cmdline\`" rd.live.image || [ "\$1" != "start" ]; then
139
    exit 0
139
    exit 0
140
fi
140
fi
141
 
141
 
142
if [ -e /.liveimg-configured ] ; then
142
if [ -e /.liveimg-configured ] ; then
143
    configdone=1
143
    configdone=1
144
fi
144
fi
145
 
145
 
146
exists() {
146
exists() {
147
    which \$1 >/dev/null 2>&1 || return
147
    which \$1 >/dev/null 2>&1 || return
148
    \$*
148
    \$*
149
}
149
}
150
 
150
 
151
# Make sure we don't mangle the hardware clock on shutdown
151
# Make sure we don't mangle the hardware clock on shutdown
152
ln -sf /dev/null /etc/systemd/system/hwclock-save.service
152
ln -sf /dev/null /etc/systemd/system/hwclock-save.service
153
 
153
 
154
livedir="LiveOS"
154
livedir="LiveOS"
155
for arg in \`cat /proc/cmdline\` ; do
155
for arg in \`cat /proc/cmdline\` ; do
156
  if [ "\${arg##rd.live.dir=}" != "\${arg}" ]; then
156
  if [ "\${arg##rd.live.dir=}" != "\${arg}" ]; then
157
    livedir=\${arg##rd.live.dir=}
157
    livedir=\${arg##rd.live.dir=}
158
    return
158
    return
159
  fi
159
  fi
160
  if [ "\${arg##live_dir=}" != "\${arg}" ]; then
160
  if [ "\${arg##live_dir=}" != "\${arg}" ]; then
161
    livedir=\${arg##live_dir=}
161
    livedir=\${arg##live_dir=}
162
    return
162
    return
163
  fi
163
  fi
164
done
164
done
165
 
165
 
166
# enable swaps unless requested otherwise
166
# enable swaps unless requested otherwise
167
swaps=\`blkid -t TYPE=swap -o device\`
167
swaps=\`blkid -t TYPE=swap -o device\`
168
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -n "\$swaps" ] ; then
168
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -n "\$swaps" ] ; then
169
  for s in \$swaps ; do
169
  for s in \$swaps ; do
170
    action "Enabling swap partition \$s" swapon \$s
170
    action "Enabling swap partition \$s" swapon \$s
171
  done
171
  done
172
fi
172
fi
173
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -f /run/initramfs/live/\${livedir}/swap.img ] ; then
173
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -f /run/initramfs/live/\${livedir}/swap.img ] ; then
174
  action "Enabling swap file" swapon /run/initramfs/live/\${livedir}/swap.img
174
  action "Enabling swap file" swapon /run/initramfs/live/\${livedir}/swap.img
175
fi
175
fi
176
 
176
 
177
mountPersistentHome() {
177
mountPersistentHome() {
178
  # support label/uuid
178
  # support label/uuid
179
  if [ "\${homedev##LABEL=}" != "\${homedev}" -o "\${homedev##UUID=}" != "\${homedev}" ]; then
179
  if [ "\${homedev##LABEL=}" != "\${homedev}" -o "\${homedev##UUID=}" != "\${homedev}" ]; then
180
    homedev=\`/sbin/blkid -o device -t "\$homedev"\`
180
    homedev=\`/sbin/blkid -o device -t "\$homedev"\`
181
  fi
181
  fi
182
 
182
 
183
  # if we're given a file rather than a blockdev, loopback it
183
  # if we're given a file rather than a blockdev, loopback it
184
  if [ "\${homedev##mtd}" != "\${homedev}" ]; then
184
  if [ "\${homedev##mtd}" != "\${homedev}" ]; then
185
    # mtd devs don't have a block device but get magic-mounted with -t jffs2
185
    # mtd devs don't have a block device but get magic-mounted with -t jffs2
186
    mountopts="-t jffs2"
186
    mountopts="-t jffs2"
187
  elif [ ! -b "\$homedev" ]; then
187
  elif [ ! -b "\$homedev" ]; then
188
    loopdev=\`losetup -f\`
188
    loopdev=\`losetup -f\`
189
    if [ "\${homedev##/run/initramfs/live}" != "\${homedev}" ]; then
189
    if [ "\${homedev##/run/initramfs/live}" != "\${homedev}" ]; then
190
      action "Remounting live store r/w" mount -o remount,rw /run/initramfs/live
190
      action "Remounting live store r/w" mount -o remount,rw /run/initramfs/live
191
    fi
191
    fi
192
    losetup \$loopdev \$homedev
192
    losetup \$loopdev \$homedev
193
    homedev=\$loopdev
193
    homedev=\$loopdev
194
  fi
194
  fi
195
 
195
 
196
  # if it's encrypted, we need to unlock it
196
  # if it's encrypted, we need to unlock it
197
  if [ "\$(/sbin/blkid -s TYPE -o value \$homedev 2>/dev/null)" = "crypto_LUKS" ]; then
197
  if [ "\$(/sbin/blkid -s TYPE -o value \$homedev 2>/dev/null)" = "crypto_LUKS" ]; then
198
    echo
198
    echo
199
    echo "Setting up encrypted /home device"
199
    echo "Setting up encrypted /home device"
200
    plymouth ask-for-password --command="cryptsetup luksOpen \$homedev EncHome"
200
    plymouth ask-for-password --command="cryptsetup luksOpen \$homedev EncHome"
201
    homedev=/dev/mapper/EncHome
201
    homedev=/dev/mapper/EncHome
202
  fi
202
  fi
203
 
203
 
204
  # and finally do the mount
204
  # and finally do the mount
205
  mount \$mountopts \$homedev /home
205
  mount \$mountopts \$homedev /home
206
  # if we have /home under what's passed for persistent home, then
206
  # if we have /home under what's passed for persistent home, then
207
  # we should make that the real /home.  useful for mtd device on olpc
207
  # we should make that the real /home.  useful for mtd device on olpc
208
  if [ -d /home/home ]; then mount --bind /home/home /home ; fi
208
  if [ -d /home/home ]; then mount --bind /home/home /home ; fi
209
  [ -x /sbin/restorecon ] && /sbin/restorecon /home
209
  [ -x /sbin/restorecon ] && /sbin/restorecon /home
210
  if [ -d /home/liveuser ]; then USERADDARGS="-M" ; fi
210
  if [ -d /home/liveuser ]; then USERADDARGS="-M" ; fi
211
}
211
}
212
 
212
 
213
findPersistentHome() {
213
findPersistentHome() {
214
  for arg in \`cat /proc/cmdline\` ; do
214
  for arg in \`cat /proc/cmdline\` ; do
215
    if [ "\${arg##persistenthome=}" != "\${arg}" ]; then
215
    if [ "\${arg##persistenthome=}" != "\${arg}" ]; then
216
      homedev=\${arg##persistenthome=}
216
      homedev=\${arg##persistenthome=}
217
      return
217
      return
218
    fi
218
    fi
219
  done
219
  done
220
}
220
}
221
 
221
 
222
if strstr "\`cat /proc/cmdline\`" persistenthome= ; then
222
if strstr "\`cat /proc/cmdline\`" persistenthome= ; then
223
  findPersistentHome
223
  findPersistentHome
224
elif [ -e /run/initramfs/live/\${livedir}/home.img ]; then
224
elif [ -e /run/initramfs/live/\${livedir}/home.img ]; then
225
  homedev=/run/initramfs/live/\${livedir}/home.img
225
  homedev=/run/initramfs/live/\${livedir}/home.img
226
fi
226
fi
227
 
227
 
228
# if we have a persistent /home, then we want to go ahead and mount it
228
# if we have a persistent /home, then we want to go ahead and mount it
229
if ! strstr "\`cat /proc/cmdline\`" nopersistenthome && [ -n "\$homedev" ] ; then
229
if ! strstr "\`cat /proc/cmdline\`" nopersistenthome && [ -n "\$homedev" ] ; then
230
  action "Mounting persistent /home" mountPersistentHome
230
  action "Mounting persistent /home" mountPersistentHome
231
fi
231
fi
232
 
232
 
233
# make it so that we don't do writing to the overlay for things which
233
# make it so that we don't do writing to the overlay for things which
234
# are just tmpdirs/caches
234
# are just tmpdirs/caches
235
mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum
235
mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum
236
mount -t tmpfs vartmp /var/tmp
236
mount -t tmpfs vartmp /var/tmp
237
[ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /var/tmp >/dev/null 2>&1
237
[ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /var/tmp >/dev/null 2>&1
238
 
238
 
239
if [ -n "\$configdone" ]; then
239
if [ -n "\$configdone" ]; then
240
  exit 0
240
  exit 0
241
fi
241
fi
242
 
242
 
243
# add live user with no passwd
243
# add live user with no passwd
244
action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser
244
action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser
245
passwd -d liveuser > /dev/null
245
passwd -d liveuser > /dev/null
246
usermod -aG wheel liveuser > /dev/null
246
usermod -aG wheel liveuser > /dev/null
247
 
247
 
248
# Remove root password lock
248
# Remove root password lock
249
passwd -d root > /dev/null
249
passwd -d root > /dev/null
250
 
250
 
251
# turn off firstboot for livecd boots
251
# turn off firstboot for livecd boots
252
systemctl --no-reload disable firstboot-text.service 2> /dev/null || :
252
systemctl --no-reload disable firstboot-text.service 2> /dev/null || :
253
systemctl --no-reload disable firstboot-graphical.service 2> /dev/null || :
253
systemctl --no-reload disable firstboot-graphical.service 2> /dev/null || :
254
systemctl stop firstboot-text.service 2> /dev/null || :
254
systemctl stop firstboot-text.service 2> /dev/null || :
255
systemctl stop firstboot-graphical.service 2> /dev/null || :
255
systemctl stop firstboot-graphical.service 2> /dev/null || :
256
 
256
 
257
# don't use prelink on a running live image
257
# don't use prelink on a running live image
258
sed -i 's/PRELINKING=yes/PRELINKING=no/' /etc/sysconfig/prelink &>/dev/null || :
258
sed -i 's/PRELINKING=yes/PRELINKING=no/' /etc/sysconfig/prelink &>/dev/null || :
259
 
259
 
260
# turn off mdmonitor by default
260
# turn off mdmonitor by default
261
systemctl --no-reload disable mdmonitor.service 2> /dev/null || :
261
systemctl --no-reload disable mdmonitor.service 2> /dev/null || :
262
systemctl --no-reload disable mdmonitor-takeover.service 2> /dev/null || :
262
systemctl --no-reload disable mdmonitor-takeover.service 2> /dev/null || :
263
systemctl stop mdmonitor.service 2> /dev/null || :
263
systemctl stop mdmonitor.service 2> /dev/null || :
264
systemctl stop mdmonitor-takeover.service 2> /dev/null || :
264
systemctl stop mdmonitor-takeover.service 2> /dev/null || :
265
 
265
 
266
# don't enable the gnome-settings-daemon packagekit plugin
266
# don't enable the gnome-settings-daemon packagekit plugin
267
gsettings set org.gnome.settings-daemon.plugins.updates active 'false' || :
267
gsettings set org.gnome.settings-daemon.plugins.updates active 'false' || :
268
 
268
 
269
# don't start cron/at as they tend to spawn things which are
269
# don't start cron/at as they tend to spawn things which are
270
# disk intensive that are painful on a live image
270
# disk intensive that are painful on a live image
271
systemctl --no-reload disable crond.service 2> /dev/null || :
271
systemctl --no-reload disable crond.service 2> /dev/null || :
272
systemctl --no-reload disable atd.service 2> /dev/null || :
272
systemctl --no-reload disable atd.service 2> /dev/null || :
273
systemctl stop crond.service 2> /dev/null || :
273
systemctl stop crond.service 2> /dev/null || :
274
systemctl stop atd.service 2> /dev/null || :
274
systemctl stop atd.service 2> /dev/null || :
275
 
275
 
276
# Mark things as configured
276
# Mark things as configured
277
touch /.liveimg-configured
277
touch /.liveimg-configured
278
 
278
 
279
# add static hostname to work around xauth bug
279
# add static hostname to work around xauth bug
280
# https://bugzilla.redhat.com/show_bug.cgi?id=679486
280
# https://bugzilla.redhat.com/show_bug.cgi?id=679486
281
echo "localhost" > /etc/hostname
281
echo "localhost" > /etc/hostname
282
 
282
 
283
# Fixing the lang install issue when other lang than English is selected . See http://bugs.centos.org/view.php?id=7217
283
# Fixing the lang install issue when other lang than English is selected . See http://bugs.centos.org/view.php?id=7217
284
/usr/bin/cp /usr/lib/python2.7/site-packages/blivet/size.py /usr/lib/python2.7/site-packages/blivet/size.py.orig
284
/usr/bin/cp /usr/lib/python2.7/site-packages/blivet/size.py /usr/lib/python2.7/site-packages/blivet/size.py.orig
285
/usr/bin/sed -i "s#return self.humanReadable()#return self.humanReadable().encode('utf-8')#g" /usr/lib/python2.7/site-packages/blivet/size.py
285
/usr/bin/sed -i "s#return self.humanReadable()#return self.humanReadable().encode('utf-8')#g" /usr/lib/python2.7/site-packages/blivet/size.py
286
 
286
 
287
EOF
287
EOF
288
 
288
 
289
# bah, hal starts way too late
289
# bah, hal starts way too late
290
cat > /etc/rc.d/init.d/livesys-late << EOF
290
cat > /etc/rc.d/init.d/livesys-late << EOF
291
#!/bin/bash
291
#!/bin/bash
292
#
292
#
293
# live: Late init script for live image
293
# live: Late init script for live image
294
#
294
#
295
# chkconfig: 345 99 01
295
# chkconfig: 345 99 01
296
# description: Late init script for live image.
296
# description: Late init script for live image.
297
 
297
 
298
. /etc/init.d/functions
298
. /etc/init.d/functions
299
 
299
 
300
if ! strstr "\`cat /proc/cmdline\`" rd.live.image || [ "\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then
300
if ! strstr "\`cat /proc/cmdline\`" rd.live.image || [ "\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then
301
    exit 0
301
    exit 0
302
fi
302
fi
303
 
303
 
304
exists() {
304
exists() {
305
    which \$1 >/dev/null 2>&1 || return
305
    which \$1 >/dev/null 2>&1 || return
306
    \$*
306
    \$*
307
}
307
}
308
 
308
 
309
touch /.liveimg-late-configured
309
touch /.liveimg-late-configured
310
 
310
 
311
# read some variables out of /proc/cmdline
311
# read some variables out of /proc/cmdline
312
for o in \`cat /proc/cmdline\` ; do
312
for o in \`cat /proc/cmdline\` ; do
313
    case \$o in
313
    case \$o in
314
    ks=*)
314
    ks=*)
315
        ks="--kickstart=\${o#ks=}"
315
        ks="--kickstart=\${o#ks=}"
316
        ;;
316
        ;;
317
    xdriver=*)
317
    xdriver=*)
318
        xdriver="\${o#xdriver=}"
318
        xdriver="\${o#xdriver=}"
319
        ;;
319
        ;;
320
    esac
320
    esac
321
done
321
done
322
 
322
 
323
# if liveinst or textinst is given, start anaconda
323
# if liveinst or textinst is given, start anaconda
324
if strstr "\`cat /proc/cmdline\`" liveinst ; then
324
if strstr "\`cat /proc/cmdline\`" liveinst ; then
325
   plymouth --quit
325
   plymouth --quit
326
   /usr/sbin/liveinst \$ks
326
   /usr/sbin/liveinst \$ks
327
fi
327
fi
328
if strstr "\`cat /proc/cmdline\`" textinst ; then
328
if strstr "\`cat /proc/cmdline\`" textinst ; then
329
   plymouth --quit
329
   plymouth --quit
330
   /usr/sbin/liveinst --text \$ks
330
   /usr/sbin/liveinst --text \$ks
331
fi
331
fi
332
 
332
 
333
# configure X, allowing user to override xdriver
333
# configure X, allowing user to override xdriver
334
if [ -n "\$xdriver" ]; then
334
if [ -n "\$xdriver" ]; then
335
   cat > /etc/X11/xorg.conf.d/00-xdriver.conf <<FOE
335
   cat > /etc/X11/xorg.conf.d/00-xdriver.conf <<FOE
336
Section "Device"
336
Section "Device"
337
	Identifier	"Videocard0"
337
	Identifier	"Videocard0"
338
	Driver	"\$xdriver"
338
	Driver	"\$xdriver"
339
EndSection
339
EndSection
340
FOE
340
FOE
341
fi
341
fi
342
 
342
 
343
EOF
343
EOF
344
 
344
 
345
chmod 755 /etc/rc.d/init.d/livesys
345
chmod 755 /etc/rc.d/init.d/livesys
346
/sbin/restorecon /etc/rc.d/init.d/livesys
346
/sbin/restorecon /etc/rc.d/init.d/livesys
347
/sbin/chkconfig --add livesys
347
/sbin/chkconfig --add livesys
348
 
348
 
349
chmod 755 /etc/rc.d/init.d/livesys-late
349
chmod 755 /etc/rc.d/init.d/livesys-late
350
/sbin/restorecon /etc/rc.d/init.d/livesys-late
350
/sbin/restorecon /etc/rc.d/init.d/livesys-late
351
/sbin/chkconfig --add livesys-late
351
/sbin/chkconfig --add livesys-late
352
 
352
 
353
# enable tmpfs for /tmp
353
# enable tmpfs for /tmp
354
systemctl enable tmp.mount
354
systemctl enable tmp.mount
355
 
355
 
356
# work around for poor key import UI in PackageKit
356
# work around for poor key import UI in PackageKit
357
rm -f /var/lib/rpm/__db*
357
rm -f /var/lib/rpm/__db*
358
releasever=$(rpm -q --qf '%{version}\n' --whatprovides system-release)
358
releasever=$(rpm -q --qf '%{version}\n' --whatprovides system-release)
359
basearch=$(uname -i)
359
basearch=$(uname -i)
360
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-*
360
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-*
361
echo "Packages within this LiveCD (with version)"
361
echo "Packages within this LiveCD (with version)"
362
rpm -qa | sort
362
rpm -qa | sort
363
echo "Packages within this LiveCD"
363
echo "Packages within this LiveCD"
364
rpm -qa --qf "%{name}\n" | sort
364
rpm -qa --qf "%{name}\n" | sort
365
# Note that running rpm recreates the rpm db files which aren't needed or wanted
365
# Note that running rpm recreates the rpm db files which aren't needed or wanted
366
rm -f /var/lib/rpm/__db*
366
rm -f /var/lib/rpm/__db*
367
 
367
 
368
# go ahead and pre-make the man -k cache (#455968)
368
# go ahead and pre-make the man -k cache (#455968)
369
/usr/bin/mandb
369
/usr/bin/mandb
370
 
370
 
371
# save a little bit of space at least...
371
# save a little bit of space at least...
372
rm -f /boot/initramfs*
372
rm -f /boot/initramfs*
373
# make sure there aren't core files lying around
373
# make sure there aren't core files lying around
374
rm -f /core*
374
rm -f /core*
375
 
375
 
376
# convince readahead not to collect
376
# convince readahead not to collect
377
# FIXME: for systemd
377
# FIXME: for systemd
378
 
378
 
379
cat >> /etc/rc.d/init.d/livesys << EOF
379
cat >> /etc/rc.d/init.d/livesys << EOF
380
 
380
 
381
 
381
 
382
# disable updates plugin
382
# disable updates plugin
383
cat >> /usr/share/glib-2.0/schemas/org.gnome.settings-daemon.plugins.updates.gschema.override << FOE
383
cat >> /usr/share/glib-2.0/schemas/org.gnome.settings-daemon.plugins.updates.gschema.override << FOE
384
[org.gnome.settings-daemon.plugins.updates]
384
[org.gnome.settings-daemon.plugins.updates]
385
active=false
385
active=false
386
FOE
386
FOE
387
 
387
 
388
# Show the system-config-keyboard tool on the desktop
388
# Show the system-config-keyboard tool on the desktop
389
mkdir /home/liveuser/Desktop -p >/dev/null
389
mkdir /home/liveuser/Desktop -p >/dev/null
390
cat /usr/share/applications/system-config-keyboard.desktop | sed '/NotShowIn/d' |sed 's/Terminal=false/Terminal=true/' > /home/liveuser/Desktop/system-config-keyboard.desktop
390
cat /usr/share/applications/system-config-keyboard.desktop | sed '/NotShowIn/d' |sed 's/Terminal=false/Terminal=true/' > /home/liveuser/Desktop/system-config-keyboard.desktop
391
cat /usr/share/applications/liveinst.desktop | sed '/NoDisplay/d' > /home/liveuser/Desktop/liveinst.desktop 
391
cat /usr/share/applications/liveinst.desktop | sed '/NoDisplay/d' > /home/liveuser/Desktop/liveinst.desktop 
392
chmod +x /home/liveuser/Desktop/*.desktop
392
chmod +x /home/liveuser/Desktop/*.desktop
393
chown -R liveuser:liveuser /home/liveuser
393
chown -R liveuser:liveuser /home/liveuser
394
 
394
 
395
# Liveuser face
395
# Liveuser face
396
if [ -e /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png ] ; then
396
if [ -e /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png ] ; then
397
    cp /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png /home/liveuser/.face
397
    cp /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png /home/liveuser/.face
398
    chown liveuser:liveuser /home/liveuser/.face
398
    chown liveuser:liveuser /home/liveuser/.face
399
fi
399
fi
400
 
400
 
401
# make the installer show up
401
# make the installer show up
402
if [ -f /usr/share/applications/liveinst.desktop ]; then
402
if [ -f /usr/share/applications/liveinst.desktop ]; then
403
  # Show harddisk install in shell dash
403
  # Show harddisk install in shell dash
404
  sed -i -e 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop 
404
  sed -i -e 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop 
405
  # need to move it to anaconda.desktop to make shell happy
405
  # need to move it to anaconda.desktop to make shell happy
406
  #cp /usr/share/applications/liveinst.desktop /usr/share/applications/anaconda.desktop
406
  #cp /usr/share/applications/liveinst.desktop /usr/share/applications/anaconda.desktop
407
fi
407
fi
408
  cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE
408
  cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE
409
[org.gnome.shell]
409
[org.gnome.shell]
410
favorite-apps=['liveinst.desktop','firefox.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'nautilus.desktop', 'gnome-documents.desktop', 'anaconda.desktop']
410
favorite-apps=['liveinst.desktop','firefox.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'nautilus.desktop', 'gnome-documents.desktop', 'anaconda.desktop']
411
FOE
411
FOE
412
 
412
 
413
 
413
 
414
# set up auto-login
414
# set up auto-login
415
cat > /etc/gdm/custom.conf << FOE
415
cat > /etc/gdm/custom.conf << FOE
416
[daemon]
416
[daemon]
417
AutomaticLoginEnable=True
417
AutomaticLoginEnable=True
418
AutomaticLogin=liveuser
418
AutomaticLogin=liveuser
419
FOE
419
FOE
420
 
420
 
421
# Turn off PackageKit-command-not-found while uninstalled
421
# Turn off PackageKit-command-not-found while uninstalled
422
if [ -f /etc/PackageKit/CommandNotFound.conf ]; then
422
if [ -f /etc/PackageKit/CommandNotFound.conf ]; then
423
  sed -i -e 's/^SoftwareSourceSearch=true/SoftwareSourceSearch=false/' /etc/PackageKit/CommandNotFound.conf
423
  sed -i -e 's/^SoftwareSourceSearch=true/SoftwareSourceSearch=false/' /etc/PackageKit/CommandNotFound.conf
424
fi
424
fi
425
 
425
 
426
# make sure to set the right permissions and selinux contexts
426
# make sure to set the right permissions and selinux contexts
427
chown -R liveuser:liveuser /home/liveuser/
427
chown -R liveuser:liveuser /home/liveuser/
428
restorecon -R /home/liveuser/
428
restorecon -R /home/liveuser/
429
 
429
 
430
# Fixing default locale to us
430
# Fixing default locale to us
431
localectl set-keymap us
431
localectl set-keymap us
432
localectl set-x11-keymap us
432
localectl set-x11-keymap us
433
EOF
433
EOF
434
 
434
 
435
# rebuild schema cache with any overrides we installed
435
# rebuild schema cache with any overrides we installed
436
glib-compile-schemas /usr/share/glib-2.0/schemas
436
glib-compile-schemas /usr/share/glib-2.0/schemas
437
 
437
 
438
 
438
 
439
%end
439
%end