From 81f4c69c833be7a51e837c199e6d09c010eb2b3d Mon Sep 17 00:00:00 2001 From: Luke Macken Date: Mon, 27 Oct 2008 22:14:54 -0400 Subject: Sync up our fedora-live-base.ks with the latest from spin-kickstarts --- fedora-live-base.ks | 129 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 104 insertions(+), 25 deletions(-) (limited to 'fedora-live-base.ks') diff --git a/fedora-live-base.ks b/fedora-live-base.ks index 6f76bf3..7156832 100644 --- a/fedora-live-base.ks +++ b/fedora-live-base.ks @@ -12,9 +12,9 @@ keyboard us timezone US/Eastern auth --useshadow --enablemd5 selinux --enforcing -firewall --disabled +firewall --enabled xconfig --startxonboot -part / --size 4096 +part / --size 3072 services --enabled=NetworkManager --disabled=network,sshd # To compose against the current release tree, use the following "repo" (enabled by default) @@ -34,13 +34,15 @@ repo --name=rawhide --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?rep @base @core @fonts +@input-methods @admin-tools @dial-up @hardware-support @printing kernel memtest86+ -firstaidkit-plugin-all + +#firstaidkit-plugin-all # save some space -specspo @@ -52,6 +54,11 @@ firstaidkit-plugin-all -sox -hplip -hpijs +sendmail +#ssmtp +-numactl +-isdn4k-utils +-autofs # smartcards won't really work on the livecd. -coolkey -ccid @@ -83,7 +90,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 @@ -107,7 +114,7 @@ touch /.liveimg-configured # mount live image if [ -b \`readlink -f /dev/live\` ]; then mkdir -p /mnt/live - mount -o ro /dev/live /mnt/live + mount -o ro /dev/live /mnt/live 2>/dev/null || mount /dev/live /mnt/live fi # enable swaps unless requested otherwise @@ -117,6 +124,9 @@ if ! strstr "\`cat /proc/cmdline\`" noswap && [ -n "\$swaps" ] ; then action "Enabling swap partition \$s" swapon \$s done fi +if ! strstr "\`cat /proc/cmdline\`" noswap && [ -f /mnt/live/LiveOS/swap.img ] ; then + action "Enabling swap file" swapon /mnt/live/LiveOS/swap.img +fi mountPersistentHome() { # support label/uuid @@ -125,7 +135,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 @@ -135,7 +148,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" @@ -143,9 +156,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() { @@ -169,8 +185,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 @@ -178,16 +194,23 @@ chkconfig --level 345 firstboot off 2>/dev/null # don't start yum-updatesd for livecd boots chkconfig --level 345 yum-updatesd off 2>/dev/null +# turn off mdmonitor by default +chkconfig --level 345 mdmonitor off 2>/dev/null + +# turn off setroubleshoot on the live image to preserve resources +chkconfig --level 345 setroubleshoot off 2>/dev/null + # don't do packagekit checking by default gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/frequency_get_updates never >/dev/null +gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/frequency_get_upgrades never >/dev/null gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/frequency_refresh_cache never >/dev/null gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/notify_available false >/dev/null - -# apparently, the gconf keys aren't enough -mkdir -p /home/fedora/.config/autostart -echo "X-GNOME-Autostart-enabled=false" >> /home/fedora/.config/autostart/gpk-update-icon.desktop -chown -R fedora:fedora /home/fedora/.config - +gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/notify_distro_upgrades false >/dev/null +gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_firmware false >/dev/null +gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_hardware false >/dev/null +gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_codec_helper false >/dev/null +gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_font_helper false >/dev/null +gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_mime_type_helper false >/dev/null # don't start cron/at as they tend to spawn things which are @@ -200,7 +223,7 @@ chkconfig --level 345 readahead_later off 2>/dev/null # make it so that we don't do writing to the overlay for things which # are just tmpdirs/caches -mount -t tmpfs varcacheyum /var/cache/yum +mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum mount -t tmpfs tmp /tmp mount -t tmpfs vartmp /var/tmp [ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /tmp /var/tmp >/dev/null 2>&1 @@ -227,7 +250,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 @@ -260,12 +283,68 @@ for o in \`cat /proc/cmdline\` ; do esac done +# this is a bad hack to work around #460581 for the geode +# purely to help move testing along for now +if [ \`grep -c Geode /proc/cpuinfo\` -ne 0 ]; then + cat > /etc/X11/xorg.conf <