Subversion Repositories livecd

Rev

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

Rev 396 Rev 397
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.7.0-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
# disable kdump service
276
# disable kdump service
277
systemctl --no-reload disable kdump.service 2> /dev/null || :
277
systemctl --no-reload disable kdump.service 2> /dev/null || :
278
systemctl stop kdump.service 2> /dev/null || :
278
systemctl stop kdump.service 2> /dev/null || :
279
 
279
 
280
# Mark things as configured
280
# Mark things as configured
281
touch /.liveimg-configured
281
touch /.liveimg-configured
282
 
282
 
283
# add static hostname to work around xauth bug
283
# add static hostname to work around xauth bug
284
# https://bugzilla.redhat.com/show_bug.cgi?id=679486
284
# https://bugzilla.redhat.com/show_bug.cgi?id=679486
285
echo "localhost" > /etc/hostname
285
echo "localhost" > /etc/hostname
286
 
286
 
287
# Fixing the lang install issue when other lang than English is selected . See http://bugs.centos.org/view.php?id=7217
287
# Fixing the lang install issue when other lang than English is selected . See http://bugs.centos.org/view.php?id=7217
288
/usr/bin/cp /usr/lib/python2.7/site-packages/blivet/size.py /usr/lib/python2.7/site-packages/blivet/size.py.orig
288
/usr/bin/cp /usr/lib/python2.7/site-packages/blivet/size.py /usr/lib/python2.7/site-packages/blivet/size.py.orig
289
/usr/bin/sed -i "s#return self.humanReadable()#return self.humanReadable().encode('utf-8')#g" /usr/lib/python2.7/site-packages/blivet/size.py
289
/usr/bin/sed -i "s#return self.humanReadable()#return self.humanReadable().encode('utf-8')#g" /usr/lib/python2.7/site-packages/blivet/size.py
290
 
290
 
291
EOF
291
EOF
292
 
292
 
293
# bah, hal starts way too late
293
# bah, hal starts way too late
294
cat > /etc/rc.d/init.d/livesys-late << EOF
294
cat > /etc/rc.d/init.d/livesys-late << EOF
295
#!/bin/bash
295
#!/bin/bash
296
#
296
#
297
# live: Late init script for live image
297
# live: Late init script for live image
298
#
298
#
299
# chkconfig: 345 99 01
299
# chkconfig: 345 99 01
300
# description: Late init script for live image.
300
# description: Late init script for live image.
301
 
301
 
302
. /etc/init.d/functions
302
. /etc/init.d/functions
303
 
303
 
304
if ! strstr "\`cat /proc/cmdline\`" rd.live.image || [ "\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then
304
if ! strstr "\`cat /proc/cmdline\`" rd.live.image || [ "\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then
305
    exit 0
305
    exit 0
306
fi
306
fi
307
 
307
 
308
exists() {
308
exists() {
309
    which \$1 >/dev/null 2>&1 || return
309
    which \$1 >/dev/null 2>&1 || return
310
    \$*
310
    \$*
311
}
311
}
312
 
312
 
313
touch /.liveimg-late-configured
313
touch /.liveimg-late-configured
314
 
314
 
315
# read some variables out of /proc/cmdline
315
# read some variables out of /proc/cmdline
316
for o in \`cat /proc/cmdline\` ; do
316
for o in \`cat /proc/cmdline\` ; do
317
    case \$o in
317
    case \$o in
318
    ks=*)
318
    ks=*)
319
        ks="--kickstart=\${o#ks=}"
319
        ks="--kickstart=\${o#ks=}"
320
        ;;
320
        ;;
321
    xdriver=*)
321
    xdriver=*)
322
        xdriver="\${o#xdriver=}"
322
        xdriver="\${o#xdriver=}"
323
        ;;
323
        ;;
324
    esac
324
    esac
325
done
325
done
326
 
326
 
327
# if liveinst or textinst is given, start anaconda
327
# if liveinst or textinst is given, start anaconda
328
if strstr "\`cat /proc/cmdline\`" liveinst ; then
328
if strstr "\`cat /proc/cmdline\`" liveinst ; then
329
   plymouth --quit
329
   plymouth --quit
330
   /usr/sbin/liveinst \$ks
330
   /usr/sbin/liveinst \$ks
331
fi
331
fi
332
if strstr "\`cat /proc/cmdline\`" textinst ; then
332
if strstr "\`cat /proc/cmdline\`" textinst ; then
333
   plymouth --quit
333
   plymouth --quit
334
   /usr/sbin/liveinst --text \$ks
334
   /usr/sbin/liveinst --text \$ks
335
fi
335
fi
336
 
336
 
337
# configure X, allowing user to override xdriver
337
# configure X, allowing user to override xdriver
338
if [ -n "\$xdriver" ]; then
338
if [ -n "\$xdriver" ]; then
339
   cat > /etc/X11/xorg.conf.d/00-xdriver.conf <<FOE
339
   cat > /etc/X11/xorg.conf.d/00-xdriver.conf <<FOE
340
Section "Device"
340
Section "Device"
341
	Identifier	"Videocard0"
341
	Identifier	"Videocard0"
342
	Driver	"\$xdriver"
342
	Driver	"\$xdriver"
343
EndSection
343
EndSection
344
FOE
344
FOE
345
fi
345
fi
346
 
346
 
347
EOF
347
EOF
348
 
348
 
349
chmod 755 /etc/rc.d/init.d/livesys
349
chmod 755 /etc/rc.d/init.d/livesys
350
/sbin/restorecon /etc/rc.d/init.d/livesys
350
/sbin/restorecon /etc/rc.d/init.d/livesys
351
/sbin/chkconfig --add livesys
351
/sbin/chkconfig --add livesys
352
 
352
 
353
chmod 755 /etc/rc.d/init.d/livesys-late
353
chmod 755 /etc/rc.d/init.d/livesys-late
354
/sbin/restorecon /etc/rc.d/init.d/livesys-late
354
/sbin/restorecon /etc/rc.d/init.d/livesys-late
355
/sbin/chkconfig --add livesys-late
355
/sbin/chkconfig --add livesys-late
356
 
356
 
357
# enable tmpfs for /tmp
357
# enable tmpfs for /tmp
358
systemctl enable tmp.mount
358
systemctl enable tmp.mount
359
 
359
 
360
# work around for poor key import UI in PackageKit
360
# work around for poor key import UI in PackageKit
361
rm -f /var/lib/rpm/__db*
361
rm -f /var/lib/rpm/__db*
362
releasever=$(rpm -q --qf '%{version}\n' --whatprovides system-release)
362
releasever=$(rpm -q --qf '%{version}\n' --whatprovides system-release)
363
basearch=$(uname -i)
363
basearch=$(uname -i)
364
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-*
364
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-*
365
echo "Packages within this LiveCD (with version)"
365
echo "Packages within this LiveCD (with version)"
366
rpm -qa | sort
366
rpm -qa | sort
367
echo "Packages within this LiveCD"
367
echo "Packages within this LiveCD"
368
rpm -qa --qf "%{name}\n" | sort
368
rpm -qa --qf "%{name}\n" | sort
369
# Note that running rpm recreates the rpm db files which aren't needed or wanted
369
# Note that running rpm recreates the rpm db files which aren't needed or wanted
370
rm -f /var/lib/rpm/__db*
370
rm -f /var/lib/rpm/__db*
371
 
371
 
372
# go ahead and pre-make the man -k cache (#455968)
372
# go ahead and pre-make the man -k cache (#455968)
373
/usr/bin/mandb
373
/usr/bin/mandb
374
 
374
 
375
# save a little bit of space at least...
375
# save a little bit of space at least...
376
rm -f /boot/initramfs*
376
rm -f /boot/initramfs*
377
# make sure there aren't core files lying around
377
# make sure there aren't core files lying around
378
rm -f /core*
378
rm -f /core*
379
 
379
 
380
# convince readahead not to collect
380
# convince readahead not to collect
381
# FIXME: for systemd
381
# FIXME: for systemd
382
 
382
 
383
cat >> /etc/rc.d/init.d/livesys << EOF
383
cat >> /etc/rc.d/init.d/livesys << EOF
384
 
384
 
385
 
385
 
386
# disable updates plugin
386
# disable updates plugin
387
cat >> /usr/share/glib-2.0/schemas/org.gnome.settings-daemon.plugins.updates.gschema.override << FOE
387
cat >> /usr/share/glib-2.0/schemas/org.gnome.settings-daemon.plugins.updates.gschema.override << FOE
388
[org.gnome.settings-daemon.plugins.updates]
388
[org.gnome.settings-daemon.plugins.updates]
389
active=false
389
active=false
390
FOE
390
FOE
391
 
391
 
392
# Show the system-config-keyboard tool on the desktop
392
# Show the system-config-keyboard tool on the desktop
393
mkdir /home/liveuser/Desktop -p >/dev/null
393
mkdir /home/liveuser/Desktop -p >/dev/null
394
cat /usr/share/applications/system-config-keyboard.desktop | sed '/NotShowIn/d' |sed 's/Terminal=false/Terminal=true/' > /home/liveuser/Desktop/system-config-keyboard.desktop
394
cat /usr/share/applications/system-config-keyboard.desktop | sed '/NotShowIn/d' |sed 's/Terminal=false/Terminal=true/' > /home/liveuser/Desktop/system-config-keyboard.desktop
395
cat /usr/share/applications/liveinst.desktop | sed '/NoDisplay/d' > /home/liveuser/Desktop/liveinst.desktop 
395
cat /usr/share/applications/liveinst.desktop | sed '/NoDisplay/d' > /home/liveuser/Desktop/liveinst.desktop 
396
chmod +x /home/liveuser/Desktop/*.desktop
396
chmod +x /home/liveuser/Desktop/*.desktop
397
chown -R liveuser:liveuser /home/liveuser
397
chown -R liveuser:liveuser /home/liveuser
398
 
398
 
399
# Liveuser face
399
# Liveuser face
400
if [ -e /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png ] ; then
400
if [ -e /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png ] ; then
401
    cp /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png /home/liveuser/.face
401
    cp /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png /home/liveuser/.face
402
    chown liveuser:liveuser /home/liveuser/.face
402
    chown liveuser:liveuser /home/liveuser/.face
403
fi
403
fi
404
 
404
 
405
# make the installer show up
405
# make the installer show up
406
if [ -f /usr/share/applications/liveinst.desktop ]; then
406
if [ -f /usr/share/applications/liveinst.desktop ]; then
407
  # Show harddisk install in shell dash
407
  # Show harddisk install in shell dash
408
  sed -i -e 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop 
408
  sed -i -e 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop 
409
  # need to move it to anaconda.desktop to make shell happy
409
  # need to move it to anaconda.desktop to make shell happy
410
  #cp /usr/share/applications/liveinst.desktop /usr/share/applications/anaconda.desktop
410
  #cp /usr/share/applications/liveinst.desktop /usr/share/applications/anaconda.desktop
411
fi
411
fi
412
  cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE
412
  cat >> /usr/share/glib-2.0/schemas/org.gnome.shell.gschema.override << FOE
413
[org.gnome.shell]
413
[org.gnome.shell]
414
favorite-apps=['liveinst.desktop','firefox.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'nautilus.desktop', 'gnome-documents.desktop', 'anaconda.desktop']
414
favorite-apps=['liveinst.desktop','firefox.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'libreoffice-writer.desktop', 'nautilus.desktop', 'gnome-documents.desktop', 'anaconda.desktop']
415
FOE
415
FOE
416
 
416
 
417
 
417
 
418
# set up auto-login
418
# set up auto-login
419
cat > /etc/gdm/custom.conf << FOE
419
cat > /etc/gdm/custom.conf << FOE
420
[daemon]
420
[daemon]
421
AutomaticLoginEnable=True
421
AutomaticLoginEnable=True
422
AutomaticLogin=liveuser
422
AutomaticLogin=liveuser
423
FOE
423
FOE
424
 
424
 
425
# Turn off PackageKit-command-not-found while uninstalled
425
# Turn off PackageKit-command-not-found while uninstalled
426
if [ -f /etc/PackageKit/CommandNotFound.conf ]; then
426
if [ -f /etc/PackageKit/CommandNotFound.conf ]; then
427
  sed -i -e 's/^SoftwareSourceSearch=true/SoftwareSourceSearch=false/' /etc/PackageKit/CommandNotFound.conf
427
  sed -i -e 's/^SoftwareSourceSearch=true/SoftwareSourceSearch=false/' /etc/PackageKit/CommandNotFound.conf
428
fi
428
fi
429
 
429
 
430
# make sure to set the right permissions and selinux contexts
430
# make sure to set the right permissions and selinux contexts
431
chown -R liveuser:liveuser /home/liveuser/
431
chown -R liveuser:liveuser /home/liveuser/
432
restorecon -R /home/liveuser/
432
restorecon -R /home/liveuser/
433
 
433
 
434
# Fixing default locale to us
434
# Fixing default locale to us
435
localectl set-keymap us
435
#localectl set-keymap us
436
localectl set-x11-keymap us
436
#localectl set-x11-keymap us
437
EOF
437
EOF
438
 
438
 
439
# rebuild schema cache with any overrides we installed
439
# rebuild schema cache with any overrides we installed
440
glib-compile-schemas /usr/share/glib-2.0/schemas
440
glib-compile-schemas /usr/share/glib-2.0/schemas
441
 
441
 
442
 
442
 
443
%end
443
%end