From: lace <> Date: Wed, 24 Mar 2010 14:50:06 +0000 (+0000) Subject: init X-Git-Url: http://git.jankratochvil.net/?p=nethome.git;a=commitdiff_plain;h=e4e4bc9830e446bdf20730bded59d42f19cb2d56;hp=1ea40ef1f96b150e005cc54fccb45fd612cbc4d4 init --- diff --git a/src/OOo-LiveCD.ks b/src/OOo-LiveCD.ks new file mode 100644 index 0000000..1546e9f --- /dev/null +++ b/src/OOo-LiveCD.ks @@ -0,0 +1,69 @@ +# $Id$ + +%include /usr/share/spin-kickstarts/fedora-livecd-desktop.ks +#%include /usr/share/rpmfusion-nonfree-remix-kickstarts/rpmfusion-nonfree-livecd-desktop.ks + +timezone Europe/Prague +selinux --disabled + +%packages --excludedocs + +# selinux toolchain of policycoreutils, libsemanage, ustr +-policycoreutils +-checkpolicy +-selinux-policy* +-libselinux-python +-libselinux +-setroubleshoot* + +# office +evince +openoffice.org-base +openoffice.org-calc +openoffice.org-impress +openoffice.org-math +openoffice.org-writer +openoffice.org-extendedPDF +-abiword + +# graphics +gimp +inkscape + +# misc +twinkle +gdb +powertop +acpitool +wget +pidgin +mutt +youtube-dl +thunderbird +qemu-img +qemu-kvm +qemu-system-x86 + +# non-free +#mplayer + +%end + +%post + +cat >> /etc/rc.d/init.d/livesys << EOF + +# set up timed auto-login for after 60 seconds +cat >> /etc/gdm/custom.conf << FOE +[daemon] +AutomaticLoginEnable=true +AutomaticLogin=liveuser +[security] +DisallowTCP=false +[greeter] +SoundOnLogin=false +FOE + +EOF + +%end diff --git a/src/OOo-LiveCD.sh b/src/OOo-LiveCD.sh new file mode 100755 index 0000000..1195796 --- /dev/null +++ b/src/OOo-LiveCD.sh @@ -0,0 +1,143 @@ +#! /bin/bash +# $Id$ + +set -ex +SIZE=2021654528 +BASE=OOo-LiveCD +BIN=$BASE.bin +ISO64=$BASE-x86_64.iso +ISO32=$BASE-i686.iso +ISO=$BASE.iso +KS=$BASE.ks +SELF=$BASE.sh +# $PWD: rpm: arguments to --root (-r) must begin with a / +MNT=$PWD/$BASE.mnt +# Cheat livecd-iso-to-disk getdisk(): +LOOPDEV=/dev/loop-$BASE.dev +LOOPDEVMK="mknod $LOOPDEV b 7 0" +LOOPDEV1=/dev/loop-$BASE.dev1 +LOOPDEV1MK="mknod $LOOPDEV1 b 7 1" + +set -o pipefail +renice +19 -p $$ +ionice -c3 -p $$ +test "`uname -m`" = "x86_64" +test ! -e $BIN +test ! -e $ISO +test ! -e $LOOPDEV +test ! -e $LOOPDEV1 +test ! -e $MNT +test -f $SELF + +if [ ! -e $ISO64 ];then + test -f $KS + livecd-creator --config=$KS --fslabel=$BASE --cache=/var/cache/live + test -e $ISO + mv -f $ISO $ISO64 +fi +if [ ! -e $ISO32 ];then + test -f $KS + setarch i686 livecd-creator --config=$KS --fslabel=$BASE --cache=/var/cache/live + test -e $ISO + mv -f $ISO $ISO32 +fi + +$LOOPDEVMK +test "`losetup $LOOPDEV 2>&1|tee /proc/self/fd/2`" = "loop: can't get info on device $LOOPDEV: No such device or address" +$LOOPDEV1MK +test "`losetup $LOOPDEV1 2>&1|tee /proc/self/fd/2`" = "loop: can't get info on device $LOOPDEV1: No such device or address" + +dd if=/dev/zero of=$BIN bs=1 seek=$[SIZE-1] count=1 +losetup $LOOPDEV $BIN +losetup -o $[34*512] $LOOPDEV1 $LOOPDEV +# --overlay-size-mb 100 --home-size-mb 100 +echo | livecd-iso-to-disk --unencrypted-home --livedir $BASE-i686 --format --reset-mbr $ISO32 $LOOPDEV +mkdir $MNT +mount $LOOPDEV1 $MNT +UUID1="$(sed <$MNT/syslinux/syslinux.cfg -n 's/^.* root=live:UUID=\([0-9A-Z]*-[0-9A-Z]*\) .*$/\1/p'|uniq)" +test -n "$UUID1" +mv $MNT/syslinux/initrd0.img $MNT/syslinux/initrd1.img +mv $MNT/syslinux/vmlinuz0 $MNT/syslinux/vmlinuz1 +umount $MNT +rmdir $MNT +livecd-iso-to-disk --unencrypted-home --livedir $BASE-x86_64 $ISO64 $LOOPDEV1 +mkdir $MNT +mount $LOOPDEV1 $MNT +UUID0="$(sed <$MNT/syslinux/syslinux.cfg -n 's/^.* root=live:UUID=\([0-9A-Z]*-[0-9A-Z]*\) .*$/\1/p'|uniq)" +test -n "$UUID0" +cp -p /usr/share/syslinux/ifcpu64.c32 $MNT/syslinux/ +cat >$MNT/syslinux/syslinux.cfg <