# eeepc kickstart for liveCDs lang en_US.UTF-8 keyboard us timezone --utc US/Mountain auth --useshadow --enablemd5 firewall --disabled selinux --enforcing xconfig --startxonboot # The following is the partition information you requested # Note that any partitions you deleted are not expressed # here so unless you clear all partitions first, this is # not guaranteed to work part / --fstype ext3 --size=4096 services --enabled=NetworkManager --disabled=network repo --name=released --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-9&arch=$basearch repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f9&arch=$basearch %packages @base-x -xorg-x11-twm -rhgb -system-config-services -system-config-networks -system-config-users -system-config-firewall @base @core -nano -finger -dump -dosfstools -mdadm -sendmail -dmraid -rsh -telnet -ypbind -system-config-network-tui -system-config-firewall-tui -blues-utils @fonts @gnome-desktop -vino -gnome-bluetooth -gnome-phone-manager -nautilus-cd-burner -bluez-gnome -dasher -gnome-pilot -orca @admin-tools -system-config-lvm -system-config-users -system-config-firewall -system-config-users -system-config-network -system-config-rootpassword -system-config-language -system-config-boot @printing -enscript -bluez-utils-cups @hardware-support @sound-and-video -totem-nautilus -icedax -totem -totem-mozplugin -bluez-utils-alsa -firefox epiphany kernel memtest86+ urw-fonts xorg-x11-fonts-ISO8859-1-100dpi ghostscript-fonts gnome-netstatus gpgme pax gnupg2 seahorse jfsutils vim-X11 acpid # save some space -specspo -esc -samba-client -a2ps -mpage -redhat-lsb -sox -hplip -hpijs # smartcards won't really work on the livecd. -coolkey -ccid # duplicate functionality -pinfo -vorbis-tools # dasher is just too big -dasher # lose the compat stuff -compat* # qlogic firmwares -ql2100-firmware -ql2200-firmware -ql23xx-firmware -ql2400-firmware # scanning takes quite a bit of space :/ -xsane -xsane-gimp -sane-backends # livecd bits to set up the livecd and be able to install anaconda isomd5sum # make sure debuginfo doesn't end up on the live image -*debuginfo %end %post # FIXME: it'd be bette to get this installed from a package cat > /etc/rc.d/init.d/fedora-live << EOF #enable acpi as part of the install chkconfig acpid on modprobe eeepc echo 'event=hotkey ATKD .*' >> /etc/acpi/events/hotkeys.conf echo 'action=/etc/acpi/actions/hotkeys.sh %e' >> /etc/acpi/events/hotkeys.conf . /etc/init.d/functions if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ] || [ -e /.liveimg-configured ] ; then exit 0 fi exists() { which \$1 >/dev/null 2>&1 || return \$* } touch /.liveimg-configured # mount live image if [ -b /dev/live ]; then mkdir -p /mnt/live mount -o ro /dev/live /mnt/live fi # enable swaps unless requested otherwise swaps=\`blkid -t TYPE=swap -o device\` if ! strstr "\`cat /proc/cmdline\`" noswap -a [ -n "\$swaps" ] ; then for s in \$swaps ; do action "Enabling swap partition \$s" swapon \$s done fi # add fedora user with no passwd useradd -c "Fedora Live" fedora passwd -d fedora > /dev/null # turn off firstboot for livecd boots 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 # 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_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 # don't start cron/at as they tend to spawn things which are # disk intensive that are painful on a live image chkconfig --level 345 crond off 2>/dev/null chkconfig --level 345 atd off 2>/dev/null chkconfig --level 345 anacron off 2>/dev/null chkconfig --level 345 readahead_early off 2>/dev/null chkconfig --level 345 readahead_later off 2>/dev/null # Stopgap fix for RH #217966; should be fixed in HAL instead touch /media/.hal-mtab # workaround clock syncing on shutdown that we don't want (#297421) sed -i -e 's/hwclock/no-such-hwclock/g' /etc/rc.d/init.d/halt EOF # bah, hal starts way too late cat > /etc/rc.d/init.d/fedora-late-live << EOF #!/bin/bash # # live: Late init script for live image # # chkconfig: 345 99 01 # description: Late init script for live image. . /etc/init.d/functions if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then exit 0 fi exists() { which \$1 >/dev/null 2>&1 || return \$* } touch /.liveimg-late-configured # read some variables out of /proc/cmdline for o in \`cat /proc/cmdline\` ; do case \$o in ks=*) ks="\${o#ks=}" ;; xdriver=*) xdriver="--set-driver=\${o#xdriver=}" ;; esac done # if liveinst or textinst is given, start anaconda if strstr "\`cat /proc/cmdline\`" liveinst ; then /usr/sbin/liveinst \$ks fi if strstr "\`cat /proc/cmdline\`" textinst ; then /usr/sbin/liveinst --text \$ks fi # configure X, allowing user to override xdriver if [ -n "\$xdriver" ]; then exists system-config-display --noui --reconfig --set-depth=24 \$xdriver fi EOF # workaround avahi segfault (#279301) 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/fedora-late-live /sbin/restorecon /etc/rc.d/init.d/fedora-late-live /sbin/chkconfig --add fedora-late-live # work around for poor key import UI in PackageKit rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora # save a little bit of space at least... rm -f /boot/initrd* # make sure there aren't core files lying around rm -f /core* #cat > /etc/acpi/actions/hotkeys.sh << EOHOTKEY ##!/bin/bash # #export DISPLAY=:0 # #case "$3" in # # #Fn+F2 # 00000010) # # Wlan On # /etc/acpi/actions/wlan.sh poweron # ;; # 00000011) # # Wlan Off # /etc/acpi/actions/wlan.sh poweroff # ;; # # #Fn+F6 # 00000012) # # Webcam switch # /etc/acpi/actions/camera.sh # # TaskManager # # /usr/bin/gnome-system-monitor # ;; # # #Fn+F7 # 00000013) # # Volume mute # /usr/bin/amixer set -D hw:0 Master toggle # ;; # # #Fn+F8 # 00000014) # # Volume down # /usr/bin/amixer set -D hw:0 Master 10%- unmute # ;; # # #Fn+F9 # 00000015) # # Volume up # /usr/bin/amixer set -D hw:0 Master 10%+ unmute # ;; # # #Fn+F5 # 00000030) # # /usr/bin/xrandr --output VGA --mode 1024x768 \ # --output LVDS --off # # if [[ "$?" != "0" ]]; then # # /usr/bin/xrandr --output VGA --preferred \ # --output LVDS --off # # fi # ;; # # 00000031) # # /usr/bin/xrandr --output LVDS --mode 800x480 \ # --output VGA --mode 800x600 # # ;; # # 00000032) # # /usr/bin/xrandr --output VGA --off \ # --output LVDS --preferred # # ;; # *) # logger "ACPI hotkey $3 action is not defined" # ;; #esac #EOHOTKEY # #cat > /etc/acpi/actions/wlan.sh << EOF ##!/bin/bash # #PWR=$(cat /sys/devices/platform/eeepc/wlan) # #UnloadModules() { # rmmod ath_pci # rmmod ath_rate_sample # rmmod wlan_scan_sta # rmmod wlan_tkip # rmmod wlan_wep # rmmod wlan #} # #LoadModules() { # modprobe ath_pci #} # #case $1 in # poweron) # if [[ "$PWR" = "0" ]]; then # modprobe pciehp pciehp_force=1 # # echo 1 > /sys/devices/platform/eeepc/wlan # # rmmod pciehp # # fi # ;; # # poweroff) # if [[ "$PWR" = "1" ]]; then # # modprobe pciehp pciehp_force=1 # # ifconfig ath0 down # # wlanconfig ath0 destroy # # UnloadModules # # echo 0 > /sys/devices/platform/eeepc/wlan # # rmmod pciehp # # fi # ;; #esac #EOF # #cat > /etc/acpi/actions/camera.sh << EOF # ##!/bin/bash # #CAMERA=$(cat /sys/devices/platform/eeepc/camera) # # if [[ "$CAMERA" = "0" ]]; then # echo 1 > /sys/devices/platform/eeepc/camera # else # echo 0 > /sys/devices/platform/eeepc/camera # fi #EOF # #chmod +x "/etc/acpi/actions/*" %end %post --nochroot cp $INSTALL_ROOT/usr/share/doc/*-release-*/GPL $LIVE_ROOT/GPL cp $INSTALL_ROOT/usr/share/doc/HTML/readme-live-image/en_US/readme-live-image-en_US.txt $LIVE_ROOT/README # only works on x86, x86_64 if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then if [ ! -d $LIVE_ROOT/LiveOS ]; then mkdir -p $LIVE_ROOT/LiveOS ; fi cp /usr/bin/livecd-iso-to-disk $LIVE_ROOT/LiveOS fi %end