Subversion Repositories livecd

Rev

Rev 383 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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