forked from srbala/fedora-kickstarts
Merge branch 'master' of ssh://git.fedorahosted.org/git/spin-kickstarts
This commit is contained in:
commit
8cfac0f250
@ -92,7 +92,7 @@ isomd5sum
|
||||
|
||||
%post
|
||||
# FIXME: it'd be better to get this installed from a package
|
||||
cat > /etc/rc.d/init.d/fedora-live << EOF
|
||||
cat > /etc/rc.d/init.d/livesys << EOF
|
||||
#!/bin/bash
|
||||
#
|
||||
# live: Init script for live image
|
||||
@ -134,7 +134,10 @@ mountPersistentHome() {
|
||||
fi
|
||||
|
||||
# if we're given a file rather than a blockdev, loopback it
|
||||
if [ ! -b "\$homedev" ]; then
|
||||
if [ "\${homedev##mtd}" != "\${homedev}" ]; then
|
||||
# mtd devs don't have a block device but get magic-mounted with -t jffs2
|
||||
mountopts="-t jffs2"
|
||||
elif [ ! -b "\$homedev" ]; then
|
||||
loopdev=\`losetup -f\`
|
||||
if [ "\${homedev##/mnt/live}" != "\${homedev}" ]; then
|
||||
action "Remounting live store r/w" mount -o remount,rw /mnt/live
|
||||
@ -144,7 +147,7 @@ mountPersistentHome() {
|
||||
fi
|
||||
|
||||
# if it's encrypted, we need to unlock it
|
||||
if [ "\$(/lib/udev/vol_id -t \$homedev)" = "crypto_LUKS" ]; then
|
||||
if [ "\$(/lib/udev/vol_id -t \$homedev 2>/dev/null)" = "crypto_LUKS" ]; then
|
||||
echo
|
||||
echo "Setting up encrypted /home device"
|
||||
plymouth ask-for-password --command="cryptsetup luksOpen \$homedev EncHome"
|
||||
@ -152,9 +155,12 @@ mountPersistentHome() {
|
||||
fi
|
||||
|
||||
# and finally do the mount
|
||||
mount \$homedev /home
|
||||
mount \$mountopts \$homedev /home
|
||||
# if we have /home under what's passed for persistent home, then
|
||||
# we should make that the real /home. useful for mtd device on olpc
|
||||
if [ -d /home/home ]; then mount --bind /home/home /home ; fi
|
||||
[ -x /sbin/restorecon ] && /sbin/restorecon /home
|
||||
if [ -d /home/fedora ]; then USERADDARGS="-M" ; fi
|
||||
if [ -d /home/liveuser ]; then USERADDARGS="-M" ; fi
|
||||
}
|
||||
|
||||
findPersistentHome() {
|
||||
@ -178,8 +184,8 @@ if ! strstr "\`cat /proc/cmdline\`" nopersistenthome && [ -n "\$homedev" ] ; the
|
||||
fi
|
||||
|
||||
# add fedora user with no passwd
|
||||
action "Adding fedora user" useradd \$USERADDARGS -c "Fedora Live" fedora
|
||||
passwd -d fedora > /dev/null
|
||||
action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser
|
||||
passwd -d liveuser > /dev/null
|
||||
|
||||
# turn off firstboot for livecd boots
|
||||
chkconfig --level 345 firstboot off 2>/dev/null
|
||||
@ -233,7 +239,7 @@ fi
|
||||
EOF
|
||||
|
||||
# bah, hal starts way too late
|
||||
cat > /etc/rc.d/init.d/fedora-late-live << EOF
|
||||
cat > /etc/rc.d/init.d/livesys-late << EOF
|
||||
#!/bin/bash
|
||||
#
|
||||
# live: Late init script for live image
|
||||
@ -286,13 +292,13 @@ EOF
|
||||
touch /etc/resolv.conf
|
||||
/sbin/restorecon /etc/resolv.conf
|
||||
|
||||
chmod 755 /etc/rc.d/init.d/fedora-live
|
||||
/sbin/restorecon /etc/rc.d/init.d/fedora-live
|
||||
/sbin/chkconfig --add fedora-live
|
||||
chmod 755 /etc/rc.d/init.d/livesys
|
||||
/sbin/restorecon /etc/rc.d/init.d/livesys
|
||||
/sbin/chkconfig --add livesys
|
||||
|
||||
chmod 755 /etc/rc.d/init.d/fedora-late-live
|
||||
/sbin/restorecon /etc/rc.d/init.d/fedora-late-live
|
||||
/sbin/chkconfig --add fedora-late-live
|
||||
chmod 755 /etc/rc.d/init.d/livesys-late
|
||||
/sbin/restorecon /etc/rc.d/init.d/livesys-late
|
||||
/sbin/chkconfig --add livesys-late
|
||||
|
||||
# work around for poor key import UI in PackageKit
|
||||
rm -f /var/lib/rpm/__db*
|
||||
|
@ -14,12 +14,4 @@ timezone Europe/Lisbon
|
||||
%end
|
||||
|
||||
%post
|
||||
# system-config-keyboard doesn't really work (missing xorg.conf etc)
|
||||
cat >>/etc/X11/xorg.conf << EOF
|
||||
Section "InputDevice"
|
||||
Identifier "Keyboard0"
|
||||
Driver "kbd"
|
||||
Option "XkbLayout" "pt"
|
||||
EndSection
|
||||
EOF
|
||||
%end
|
||||
|
@ -63,14 +63,14 @@ scim-pinyin
|
||||
%end
|
||||
|
||||
%post
|
||||
cat >> /etc/rc.d/init.d/fedora-live << EOF
|
||||
cat >> /etc/rc.d/init.d/livesys << EOF
|
||||
# disable screensaver locking
|
||||
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-screensaver/lock_enabled false >/dev/null
|
||||
# set up timed auto-login for after 60 seconds
|
||||
cat >> /etc/gdm/custom.conf << FOE
|
||||
[daemon]
|
||||
TimedLoginEnable=true
|
||||
TimedLogin=fedora
|
||||
TimedLogin=liveuser
|
||||
TimedLoginDelay=60
|
||||
FOE
|
||||
|
||||
|
@ -111,7 +111,7 @@ DISPLAYMANAGER="KDM"
|
||||
EOF
|
||||
|
||||
# add initscript
|
||||
cat >> /etc/rc.d/init.d/fedora-live << EOF
|
||||
cat >> /etc/rc.d/init.d/livesys << EOF
|
||||
|
||||
if [ -e /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png ] ; then
|
||||
# use image also for kdm
|
||||
@ -120,25 +120,25 @@ if [ -e /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png ] ; then
|
||||
fi
|
||||
|
||||
# make fedora user use KDE
|
||||
echo "startkde" > /home/fedora/.xsession
|
||||
chmod a+x /home/fedora/.xsession
|
||||
chown fedora:fedora /home/fedora/.xsession
|
||||
echo "startkde" > /home/liveuser/.xsession
|
||||
chmod a+x /home/liveuser/.xsession
|
||||
chown liveuser:liveuser /home/liveuser/.xsession
|
||||
|
||||
# set up autologin for user fedora
|
||||
sed -i 's/#AutoLoginEnable=true/AutoLoginEnable=true/' /etc/kde/kdm/kdmrc
|
||||
sed -i 's/#AutoLoginUser=fred/AutoLoginUser=fedora/' /etc/kde/kdm/kdmrc
|
||||
sed -i 's/#AutoLoginUser=fred/AutoLoginUser=liveuser/' /etc/kde/kdm/kdmrc
|
||||
|
||||
# set up user fedora as default user and preselected user
|
||||
sed -i 's/#PreselectUser=Default/PreselectUser=Default/' /etc/kde/kdm/kdmrc
|
||||
sed -i 's/#DefaultUser=johndoe/DefaultUser=fedora/' /etc/kde/kdm/kdmrc
|
||||
sed -i 's/#DefaultUser=johndoe/DefaultUser=liveuser/' /etc/kde/kdm/kdmrc
|
||||
|
||||
# add apps to favorites menu
|
||||
mkdir -p /home/fedora/.kde/share/config/
|
||||
cat > /home/fedora/.kde/share/config/kickoffrc << MENU_EOF
|
||||
mkdir -p /home/liveuser/.kde/share/config/
|
||||
cat > /home/liveuser/.kde/share/config/kickoffrc << MENU_EOF
|
||||
[Favorites]
|
||||
FavoriteURLs=/usr/share/applications/kde4/konqbrowser.desktop,/usr/share/applications/kde4/dolphin.desktop,/usr/share/applications/liveinst.desktop
|
||||
MENU_EOF
|
||||
chown -R fedora:fedora /home/fedora/.kde/
|
||||
chown -R liveuser:liveuser /home/liveuser/.kde/
|
||||
|
||||
# show liveinst.desktop on and in menu
|
||||
sed -i 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop
|
||||
|
@ -17,8 +17,8 @@ timezone Europe/Lisbon
|
||||
# set up localized keyboard since it is not used in /etc/X11/xorg.conf anymore and
|
||||
# KDE don't use /etc/sysconfig/keyboard.
|
||||
# Replace "de-latin1-nodeadkeys" with the keyboard layout you have used above
|
||||
mkdir -p /home/fedora/.kde/env
|
||||
echo "system-config-keyboard --noui de-latin1-nodeadkeys" > /home/fedora/.kde/env/keyboard.sh
|
||||
chmod +x /home/fedora/.kde/env/keyboard.sh
|
||||
chown -R fedora:fedora /home/fedora/.kde/env/
|
||||
mkdir -p /home/liveuser/.kde/env
|
||||
echo "system-config-keyboard --noui de-latin1-nodeadkeys" > /home/liveuser/.kde/env/keyboard.sh
|
||||
chmod +x /home/liveuser/.kde/env/keyboard.sh
|
||||
chown -R liveuser:liveuser /home/liveuser/.kde/env/
|
||||
%end
|
||||
|
@ -179,7 +179,7 @@ DISPLAYMANAGER="KDE"
|
||||
EOF
|
||||
|
||||
# add initscript qnd # Fedora Electronic Lab: KDE keyboard layouts
|
||||
cat >> /etc/rc.d/init.d/fedora-live << EOF
|
||||
cat >> /etc/rc.d/init.d/livesys << EOF
|
||||
|
||||
if [ -e /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png ] ; then
|
||||
# use image also for kdm
|
||||
@ -188,17 +188,17 @@ if [ -e /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png ] ; then
|
||||
fi
|
||||
|
||||
# make fedora user use KDE
|
||||
echo "startkde" > /home/fedora/.xsession
|
||||
chmod a+x /home/fedora/.xsession
|
||||
chown fedora:fedora /home/fedora/.xsession
|
||||
echo "startkde" > /home/liveuser/.xsession
|
||||
chmod a+x /home/liveuser/.xsession
|
||||
chown liveuser:liveuser /home/liveuser/.xsession
|
||||
|
||||
# set up autologin for user fedora
|
||||
sed -i 's/#AutoLoginEnable=true/AutoLoginEnable=true/' /etc/kde/kdm/kdmrc
|
||||
sed -i 's/#AutoLoginUser=fred/AutoLoginUser=fedora/' /etc/kde/kdm/kdmrc
|
||||
sed -i 's/#AutoLoginUser=fred/AutoLoginUser=liveuser/' /etc/kde/kdm/kdmrc
|
||||
|
||||
# set up user fedora as default user and preselected user
|
||||
sed -i 's/#PreselectUser=Default/PreselectUser=Default/' /etc/kde/kdm/kdmrc
|
||||
sed -i 's/#DefaultUser=johndoe/DefaultUser=fedora/' /etc/kde/kdm/kdmrc
|
||||
sed -i 's/#DefaultUser=johndoe/DefaultUser=liveuser/' /etc/kde/kdm/kdmrc
|
||||
|
||||
# disable screensaver
|
||||
sed -i 's/Enabled=true/Enabled=false/' /usr/share/kde-settings/kde-profile/default/share/config/kdesktoprc
|
||||
|
@ -18,9 +18,9 @@ timezone Europe/Zurich
|
||||
# set up localized keyboard since it is not used in /etc/X11/xorg.conf anymore and
|
||||
# KDE don't use /etc/sysconfig/keyboard.
|
||||
# Replace "sg-latin1-nodeadkeys" with the keyboard layout you have used above
|
||||
mkdir -p /home/fedora/.kde/env
|
||||
echo "system-config-keyboard --noui sg-latin1-nodeadkeys" > /home/fedora/.kde/env/keyboard.sh
|
||||
chmod +x /home/fedora/.kde/env/keyboard.sh
|
||||
chown -R fedora:fedora /home/fedora/.kde/env/
|
||||
mkdir -p /home/liveuser/.kde/env
|
||||
echo "system-config-keyboard --noui sg-latin1-nodeadkeys" > /home/liveuser/.kde/env/keyboard.sh
|
||||
chmod +x /home/liveuser/.kde/env/keyboard.sh
|
||||
chown -R liveuser:liveuser /home/liveuser/.kde/env/
|
||||
|
||||
%end
|
||||
|
@ -18,9 +18,9 @@ timezone Europe/Berlin
|
||||
# set up localized keyboard since it is not used in /etc/X11/xorg.conf anymore and
|
||||
# KDE don't use /etc/sysconfig/keyboard.
|
||||
# Replace "de-latin1-nodeadkeys" with the keyboard layout you have used above
|
||||
mkdir -p /home/fedora/.kde/env
|
||||
echo "system-config-keyboard --noui de-latin1-nodeadkeys" > /home/fedora/.kde/env/keyboard.sh
|
||||
chmod +x /home/fedora/.kde/env/keyboard.sh
|
||||
chown -R fedora:fedora /home/fedora/.kde/env/
|
||||
mkdir -p /home/liveuser/.kde/env
|
||||
echo "system-config-keyboard --noui de-latin1-nodeadkeys" > /home/liveuser/.kde/env/keyboard.sh
|
||||
chmod +x /home/liveuser/.kde/env/keyboard.sh
|
||||
chown -R liveuser:liveuser /home/liveuser/.kde/env/
|
||||
|
||||
%end
|
@ -18,8 +18,8 @@ timezone Europe/Lisbon
|
||||
# set up localized keyboard since it is not used in /etc/X11/xorg.conf anymore and
|
||||
# KDE don't use /etc/sysconfig/keyboard.
|
||||
# Replace "de-latin1-nodeadkeys" with the keyboard layout you have used above
|
||||
mkdir -p /home/fedora/.kde/env
|
||||
echo "system-config-keyboard --noui de-latin1-nodeadkeys" > /home/fedora/.kde/env/keyboard.sh
|
||||
chmod +x /home/fedora/.kde/env/keyboard.sh
|
||||
chown -R fedora:fedora /home/fedora/.kde/env/
|
||||
mkdir -p /home/liveuser/.kde/env
|
||||
echo "system-config-keyboard --noui de-latin1-nodeadkeys" > /home/liveuser/.kde/env/keyboard.sh
|
||||
chmod +x /home/liveuser/.kde/env/keyboard.sh
|
||||
chown -R liveuser:liveuser /home/liveuser/.kde/env/
|
||||
%end
|
||||
|
@ -85,7 +85,7 @@ DISPLAYMANAGER="KDM"
|
||||
EOF
|
||||
|
||||
# add initscript
|
||||
cat >> /etc/rc.d/init.d/fedora-live << EOF
|
||||
cat >> /etc/rc.d/init.d/livesys << EOF
|
||||
|
||||
if [ -e /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png ] ; then
|
||||
# use image also for kdm
|
||||
@ -94,25 +94,25 @@ if [ -e /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png ] ; then
|
||||
fi
|
||||
|
||||
# make fedora user use KDE
|
||||
echo "startkde" > /home/fedora/.xsession
|
||||
chmod a+x /home/fedora/.xsession
|
||||
chown fedora:fedora /home/fedora/.xsession
|
||||
echo "startkde" > /home/liveuser/.xsession
|
||||
chmod a+x /home/liveuser/.xsession
|
||||
chown liveuser:liveuser /home/liveuser/.xsession
|
||||
|
||||
# set up autologin for user fedora
|
||||
sed -i 's/#AutoLoginEnable=true/AutoLoginEnable=true/' /etc/kde/kdm/kdmrc
|
||||
sed -i 's/#AutoLoginUser=fred/AutoLoginUser=fedora/' /etc/kde/kdm/kdmrc
|
||||
sed -i 's/#AutoLoginUser=fred/AutoLoginUser=liveuser/' /etc/kde/kdm/kdmrc
|
||||
|
||||
# set up user fedora as default user and preselected user
|
||||
sed -i 's/#PreselectUser=Default/PreselectUser=Default/' /etc/kde/kdm/kdmrc
|
||||
sed -i 's/#DefaultUser=johndoe/DefaultUser=fedora/' /etc/kde/kdm/kdmrc
|
||||
sed -i 's/#DefaultUser=johndoe/DefaultUser=liveuser/' /etc/kde/kdm/kdmrc
|
||||
|
||||
# add liveinst.desktop to favorites menu
|
||||
mkdir -p /home/fedora/.kde/share/config/
|
||||
cat > /home/fedora/.kde/share/config/kickoffrc << MENU_EOF
|
||||
mkdir -p /home/liveuser/.kde/share/config/
|
||||
cat > /home/liveuser/.kde/share/config/kickoffrc << MENU_EOF
|
||||
[Favorites]
|
||||
FavoriteURLs=/usr/share/applications/kde4/konqbrowser.desktop,/usr/share/applications/kde4/dolphin.desktop,/usr/share/applications/kde4/systemsettings.desktop,/usr/share/applications/liveinst.desktop
|
||||
MENU_EOF
|
||||
chown -R fedora:fedora /home/fedora/.kde/
|
||||
chown -R liveuser:liveuser /home/liveuser/.kde/
|
||||
|
||||
# show liveinst.desktop on and in menu
|
||||
sed -i 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop
|
||||
|
@ -142,9 +142,9 @@ cat > /etc/sysconfig/desktop <<EOF
|
||||
PREFERRED=/usr/bin/startxfce4
|
||||
EOF
|
||||
|
||||
mkdir -p /home/fedora/.config/tracker
|
||||
mkdir -p /home/liveuser/.config/tracker
|
||||
|
||||
cat > /home/fedora/.config/tracker/tracker.cfg <<EOF
|
||||
cat > /home/liveuser/.config/tracker/tracker.cfg <<EOF
|
||||
[Indexing]
|
||||
EnableIndexing=false
|
||||
Language=en
|
||||
@ -157,8 +157,8 @@ EnableIndexing=false
|
||||
Language=en
|
||||
EOF
|
||||
|
||||
cat >> /etc/rc.d/init.d/fedora-live << EOF
|
||||
chown -R fedora:fedora /home/fedora
|
||||
cat >> /etc/rc.d/init.d/livesys << EOF
|
||||
chown -R liveuser:liveuser /home/liveuser
|
||||
|
||||
# disable screensaver locking
|
||||
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-screensaver/lock_enabled false >/dev/null
|
||||
@ -166,7 +166,7 @@ gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults
|
||||
cat >> /etc/gdm/custom.conf << FOE
|
||||
[daemon]
|
||||
TimedLoginEnable=true
|
||||
TimedLogin=fedora
|
||||
TimedLogin=liveuser
|
||||
TimedLoginDelay=60
|
||||
FOE
|
||||
|
||||
|
@ -14,12 +14,4 @@ timezone Europe/Lisbon
|
||||
%end
|
||||
|
||||
%post
|
||||
# system-config-keyboard doesn't really work (missing xorg.conf etc)
|
||||
cat >>/etc/X11/xorg.conf << EOF
|
||||
Section "InputDevice"
|
||||
Identifier "Keyboard0"
|
||||
Driver "kbd"
|
||||
Option "XkbLayout" "pt"
|
||||
EndSection
|
||||
EOF
|
||||
%end
|
||||
|
@ -107,9 +107,9 @@ BEGIN {
|
||||
}' < /etc/yum.repos.d/fedora.repo > /etc/yum.repos.d/fedora.repo.tmp
|
||||
mv /etc/yum.repos.d/fedora.repo{.tmp,}
|
||||
|
||||
cat >> /etc/rc.d/init.d/fedora-live << EOF
|
||||
cat >> /etc/rc.d/init.d/livesys << EOF
|
||||
# Put link to demonstration videos on the desktop
|
||||
pushd /home/fedora/Desktop
|
||||
pushd /home/liveuser/Desktop
|
||||
ln -s /usr/share/eclipse-demos-0.0.1 "Eclipse demonstration videos"
|
||||
popd
|
||||
EOF
|
||||
|
@ -150,15 +150,15 @@ compat-gcc-34-c++
|
||||
|
||||
# Fedora Electronic Lab:
|
||||
|
||||
mkdir -p /home/fedora/.kde/share/config/
|
||||
mkdir -p /home/liveuser/.kde/share/config/
|
||||
|
||||
# kill stupid klipper
|
||||
cat > /home/fedora/.kde/share/config/klipperrc <<EOF
|
||||
cat > /home/liveuser/.kde/share/config/klipperrc <<EOF
|
||||
[General]
|
||||
AutoStart=false
|
||||
EOF
|
||||
|
||||
cat > /home/fedora/.kde/share/config/kxkbrc <<EOF
|
||||
cat > /home/liveuser/.kde/share/config/kxkbrc <<EOF
|
||||
[Layout]
|
||||
DisplayNames=us,ch,de,fr
|
||||
IndicatorOnly=false
|
||||
|
@ -14,12 +14,4 @@ timezone Europe/Lisbon
|
||||
%end
|
||||
|
||||
%post
|
||||
# system-config-keyboard doesn't really work (missing xorg.conf etc)
|
||||
cat >>/etc/X11/xorg.conf << EOF
|
||||
Section "InputDevice"
|
||||
Identifier "Keyboard0"
|
||||
Driver "kbd"
|
||||
Option "XkbLayout" "pt"
|
||||
EndSection
|
||||
EOF
|
||||
%end
|
||||
|
@ -5,6 +5,6 @@ cat >>/etc/X11/xorg.conf << EOF
|
||||
Section "InputDevice"
|
||||
Identifier "Keyboard0"
|
||||
Driver "kbd"
|
||||
Option "XkbLayout" "pt-latin1"
|
||||
Option "XkbLayout" "pt"
|
||||
EndSection
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user