From ca2f8913a2901b7c0a59046aca0afbb9f1c24e49 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Thu, 2 Oct 2008 11:05:16 -0400 Subject: [PATCH] Switch out references to fedora in initscript and username to be generic --- fedora-live-base.ks | 22 +++++++++++----------- fedora-livecd-desktop.ks | 4 ++-- fedora-livecd-education-math.ks | 14 +++++++------- fedora-livecd-electronic-lab-pt_PT.ks | 8 ++++---- fedora-livecd-electronic-lab.ks | 8 ++++---- fedora-livecd-kde-de_CH.ks | 8 ++++---- fedora-livecd-kde-de_DE.ks | 8 ++++---- fedora-livecd-kde-pt_PT.ks | 8 ++++---- fedora-livecd-kde.ks | 18 +++++++++--------- fedora-livecd-xfce.ks | 10 +++++----- fedora-livedvd-developer.ks | 4 ++-- fedora-livedvd-electronic-lab.ks | 6 +++--- 12 files changed, 59 insertions(+), 59 deletions(-) diff --git a/fedora-live-base.ks b/fedora-live-base.ks index 8ba892a..58daf9c 100644 --- a/fedora-live-base.ks +++ b/fedora-live-base.ks @@ -89,7 +89,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 @@ -151,7 +151,7 @@ mountPersistentHome() { # and finally do the mount mount \$homedev /home [ -x /sbin/restorecon ] && /sbin/restorecon /home - if [ -d /home/fedora ]; then USERADDARGS="-M" ; fi + if [ -d /home/liveuser ]; then USERADDARGS="-M" ; fi } findPersistentHome() { @@ -175,8 +175,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 @@ -230,7 +230,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 @@ -283,13 +283,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* diff --git a/fedora-livecd-desktop.ks b/fedora-livecd-desktop.ks index bfda592..4de25bd 100644 --- a/fedora-livecd-desktop.ks +++ b/fedora-livecd-desktop.ks @@ -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 diff --git a/fedora-livecd-education-math.ks b/fedora-livecd-education-math.ks index fbb4156..0684791 100644 --- a/fedora-livecd-education-math.ks +++ b/fedora-livecd-education-math.ks @@ -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,9 +120,9 @@ 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 fedora:fedora /home/liveuser/.xsession # set up autologin for user fedora sed -i 's/#AutoLoginEnable=true/AutoLoginEnable=true/' /etc/kde/kdm/kdmrc @@ -133,12 +133,12 @@ sed -i 's/#PreselectUser=Default/PreselectUser=Default/' /etc/kde/kdm/kdmrc sed -i 's/#DefaultUser=johndoe/DefaultUser=fedora/' /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 fedora:fedora /home/liveuser/.kde/ # show liveinst.desktop on and in menu sed -i 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop diff --git a/fedora-livecd-electronic-lab-pt_PT.ks b/fedora-livecd-electronic-lab-pt_PT.ks index 2c98ce9..93f395a 100644 --- a/fedora-livecd-electronic-lab-pt_PT.ks +++ b/fedora-livecd-electronic-lab-pt_PT.ks @@ -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 fedora:fedora /home/liveuser/.kde/env/ %end diff --git a/fedora-livecd-electronic-lab.ks b/fedora-livecd-electronic-lab.ks index d56e8c8..69f9ee0 100644 --- a/fedora-livecd-electronic-lab.ks +++ b/fedora-livecd-electronic-lab.ks @@ -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,9 +188,9 @@ 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 fedora:fedora /home/liveuser/.xsession # set up autologin for user fedora sed -i 's/#AutoLoginEnable=true/AutoLoginEnable=true/' /etc/kde/kdm/kdmrc diff --git a/fedora-livecd-kde-de_CH.ks b/fedora-livecd-kde-de_CH.ks index e19fa4f..f508ad1 100644 --- a/fedora-livecd-kde-de_CH.ks +++ b/fedora-livecd-kde-de_CH.ks @@ -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 fedora:fedora /home/liveuser/.kde/env/ %end diff --git a/fedora-livecd-kde-de_DE.ks b/fedora-livecd-kde-de_DE.ks index 2f3934a..ecc5654 100644 --- a/fedora-livecd-kde-de_DE.ks +++ b/fedora-livecd-kde-de_DE.ks @@ -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 fedora:fedora /home/liveuser/.kde/env/ %end \ No newline at end of file diff --git a/fedora-livecd-kde-pt_PT.ks b/fedora-livecd-kde-pt_PT.ks index 40c84c4..134bea2 100644 --- a/fedora-livecd-kde-pt_PT.ks +++ b/fedora-livecd-kde-pt_PT.ks @@ -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 fedora:fedora /home/liveuser/.kde/env/ %end diff --git a/fedora-livecd-kde.ks b/fedora-livecd-kde.ks index 38d1131..878a054 100644 --- a/fedora-livecd-kde.ks +++ b/fedora-livecd-kde.ks @@ -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 fedora:fedora /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 fedora:fedora /home/liveuser/.kde/ # show liveinst.desktop on and in menu sed -i 's/NoDisplay=true/NoDisplay=false/' /usr/share/applications/liveinst.desktop diff --git a/fedora-livecd-xfce.ks b/fedora-livecd-xfce.ks index 866197d..1cb7d61 100644 --- a/fedora-livecd-xfce.ks +++ b/fedora-livecd-xfce.ks @@ -142,9 +142,9 @@ cat > /etc/sysconfig/desktop < /home/fedora/.config/tracker/tracker.cfg < /home/liveuser/.config/tracker/tracker.cfg <> /etc/rc.d/init.d/fedora-live << EOF -chown -R fedora:fedora /home/fedora +cat >> /etc/rc.d/init.d/livesys << EOF +chown -R fedora:fedora /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 diff --git a/fedora-livedvd-developer.ks b/fedora-livedvd-developer.ks index deff919..483fb44 100644 --- a/fedora-livedvd-developer.ks +++ b/fedora-livedvd-developer.ks @@ -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 diff --git a/fedora-livedvd-electronic-lab.ks b/fedora-livedvd-electronic-lab.ks index 59e9773..0076e13 100644 --- a/fedora-livedvd-electronic-lab.ks +++ b/fedora-livedvd-electronic-lab.ks @@ -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 < /home/liveuser/.kde/share/config/klipperrc < /home/fedora/.kde/share/config/kxkbrc < /home/liveuser/.kde/share/config/kxkbrc <