Subversion Repositories livecd

Rev

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

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