+++ /dev/null
-#!/bin/bash
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/gamecdfs-update.sh,v 1.6 2004/12/16 17:51:23 wolf31o2 Exp $
-
-# we grab our configuration
-source "${clst_gamecd_conf}" || exit 1
-
-# here we replace out game information into several files
-sed -i -e "s:livecd:gamecd:" /etc/hosts
-sed -i -e "s:##GAME_NAME:${GAME_NAME}:" /etc/motd
-
-# here we setup our xinitrc
-echo "exec ${GAME_EXECUTABLE}" > /etc/X11/xinit/xinitrc
-
-# we add spind to default here since we don't want the CD to spin down
-rc-update add spind default
+++ /dev/null
-#!/bin/bash
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/kmerge.sh,v 1.25 2005/03/07 21:14:42 wolf31o2 Exp $
-
-die() {
- echo "$1"
- exit 1
-}
-
-build_kernel() {
- # default genkernel args
- GK_ARGS="${clst_livecd_gk_mainargs} \
- ${clst_livecd_gk_kernargs} \
- --no-mountboot \
- --kerneldir=/usr/src/linux \
- --kernel-config=/var/tmp/${clst_kname}.config \
- --minkernpackage=/usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.tar.bz2 all"
-
- # extra genkernel options that we have to test for
- if [ "${clst_livecd_splash_type}" == "bootsplash" -a -n "${clst_livecd_splash_theme}" ]
- then
- GK_ARGS="${GK_ARGS} --bootsplash=${clst_livecd_splash_theme}"
- fi
-
- if [ "${clst_livecd_splash_type}" == "gensplash" -a -n "${clst_livecd_splash_theme}" ]
- then
- GK_ARGS="${GK_ARGS} --gensplash=${clst_livecd_splash_theme}"
- fi
-
- if [ -n "${clst_CCACHE}" ]
- then
- GK_ARGS="${GK_ARGS} --kernel-cc=/usr/lib/ccache/bin/gcc --utils-cc=/usr/lib/ccache/bin/gcc"
- fi
-
- if [ -e "/var/tmp/${clst_kname}.postconf" ]
- then
- for x in $( cat /var/tmp/${clst_kname}.postconf )
- do
- clst_kernel_postconf="${clst_kernel_postconf} ${x}"
- done
- fi
-
- if [ -e "/var/tmp/${clst_kname}.packages" ]
- then
- for x in $( cat /var/tmp/${clst_kname}.packages )
- do
- clst_kernel_merge="${clst_kernel_merge} ${x}"
- done
- fi
-
- if [ "${clst_livecd_devmanager}" == "udev" ]
- then
- GK_ARGS="${GK_ARGS} --udev"
- else
- GK_ARGS="${GK_ARGS} --no-udev"
- fi
-
- # build with genkernel using the set options
- # callback and postconf are put here to avoid escaping issues
- if [ -e "/var/tmp/${clst_kname}.packages" -a \
- -e "/var/tmp/${clst_kname}.postconf" ]
- then
- genkernel --callback="emerge ${clst_kernel_merge}" \
- --postconf="emerge ${clst_kernel_postconf}" \
- ${GK_ARGS} || exit 1
- elif [ -e "/var/tmp/${clst_kname}.packages" ]
- then
- genkernel --callback="emerge ${clst_kernel_merge}" \
- ${GK_ARGS} || exit 1
- elif [ -e "/var/tmp/${clst_kname}.postconf" ]
- then
- genkernel --postconf="emerge ${clst_kernel_postconf}" \
- ${GK_ARGS} || exit 1
- else
- genkernel ${GK_ARGS} || exit 1
- fi
-
- # pack up the modules for resuming
- if [ -n "${clst_KERNCACHE}" ]
- then
- tar cjpf /usr/portage/packages/gk_binaries/${1}-modules-${clst_version_stamp}.tar.bz2 \
- /lib/modules/${1} || die "Could not package kernel modules, exiting"
- fi
-}
-
-# Script to build each kernel, kernel-related packages
-/usr/sbin/env-update
-source /etc/profile
-
-[ -n "${clst_ENVSCRIPT}" ] && source /tmp/envscript
-export CONFIG_PROTECT="-*"
-rm -f /usr/src/linux
-
-#set the timezone for the kernel build
-rm /etc/localtime
-ln -s /usr/share/zoneinfo/UTC /etc/localtime
-
-[ -e "/var/tmp/${clst_kname}.use" ] && export USE="$( cat /var/tmp/${clst_kname}.use )" || unset USE
-[ -e "/var/tmp/${clst_kname}.gk_kernargs" ] && source /var/tmp/${clst_kname}.gk_kernargs
-
-# Don't use pkgcache here, as the kernel source may get emerge with different USE variables
-# (and thus different patches enabled/disabled.) Also, there's no real benefit in using the
-# pkgcache for kernel source ebuilds.
-emerge "${clst_ksource}" || exit 1
-[ ! -e /usr/src/linux ] && die "Can't find required directory /usr/src/linux"
-
-#if catalyst has set NULL_VALUE, extraversion wasn't specified so we skip this part
-if [ "${clst_kextversion}" != "NULL_VALUE" ]
-then
- sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextversion}:" /usr/src/linux/Makefile
-fi
-
-if [ -n "${clst_CCACHE}" ]
-then
- #enable ccache for genkernel
- export PATH="/usr/lib/ccache/bin:${PATH}"
-fi
-
-# grep out the kernel version so that we can do our modules magic
-VER=`grep ^VERSION\ \= /usr/src/linux/Makefile | awk '{ print $3 };'`
-PAT=`grep ^PATCHLEVEL\ \= /usr/src/linux/Makefile | awk '{ print $3 };'`
-SUB=`grep ^SUBLEVEL\ \= /usr/src/linux/Makefile | awk '{ print $3 };'`
-EXV=`grep ^EXTRAVERSION\ \= /usr/src/linux/Makefile | sed -e "s/EXTRAVERSION =//" -e "s/ //g"`
-clst_fudgeuname=${VER}.${PAT}.${SUB}${EXV}
-
-# kernel building happens here
-# does the old config exist? if it does not, we build by default
-if [ -e "/usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.config" ]
-then
- # test to see if the kernel .configs are the same, if so, then we skip kernel building
- test1=$(md5sum /var/tmp/${clst_kname}.config | cut -d " " -f 1)
- test2=$(md5sum /usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.config | cut -d " " -f 1)
- if [ "${test1}" == "${test2}" -a -n "${clst_KERNCACHE}" ]
- then
- echo
- echo "No kernel configuration change, skipping kernel build..."
- echo
- sleep 5
-
- # unpack our modules to the LiveCD fs
- echo
- echo "Unpacking kernel modules from the previous build..."
- echo
- [ ! -d /lib/modules ] && mkdir /lib/modules
- tar xjpf /usr/portage/packages/gk_binaries/${clst_fudgeuname}-modules-${clst_version_stamp}.tar.bz2 \
- -C / || die "Could not unpack kernel modules"
- else
- build_kernel ${clst_fudgeuname}
- fi
-
-else
- build_kernel ${clst_fudgeuname}
-
-fi
-
-/sbin/modules-update --assume-kernel=${clst_fudgeuname}
-
-#now the unmerge... (wipe db entry)
-#emerge -C ${clst_ksource}
-unset USE
-
-echo
-# keep the config around so that we can resume at some point
-if [ -n "${clst_KERNCACHE}" ]
-then
- cp /var/tmp/${clst_kname}.config \
- /usr/portage/packages/gk_binaries/${clst_kname}-${clst_version_stamp}.config
-fi
-echo
+++ /dev/null
-#!/bin/bash
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/livecdfs-update.sh,v 1.35 2005/03/30 17:29:13 wolf31o2 Exp $
-
-/usr/sbin/env-update
-source /etc/profile
-
-# allow root logins to the livecd by default
-if [ -e /etc/sshd/sshd_config ]
-then
- sed -i 's:^#PermitRootLogin\ yes:PermitRootLogin\ yes:' /etc/ssh/sshd_config
-fi
-
-# turn off udev tarball
-sed -i 's:RC_DEVICE_TARBALL="yes":RC_DEVICE_TARBALL="no":' /etc/conf.d/rc
-
-# turn bashlogin shells to actual login shells
-sed -i 's:exec -l /bin/bash:exec -l /bin/bash -l:' /bin/bashlogin
-
-# default programs that we always want to start
-rc-update del iptables default
-rc-update del netmount default
-rc-update add autoconfig default
-rc-update del keymaps
-rc-update del serial
-rc-update del consolefont
-rc-update add modules default
-rc-update add pwgen default
-[ -e /etc/init.d/bootsplash ] && rc-update add bootsplash default
-[ -e /etc/init.d/splash ] && rc-update add splash default
-[ -e /etc/init.d/sysklogd ] && rc-update add sysklogd default
-[ -e /etc/init.d/metalog ] && rc-update add metalog default
-[ -e /etc/init.d/syslog-ng ] && rc-update add syslog-ng default
-[ -e /etc/init.d/alsasound ] && rc-update add alsasound default
-
-# Comment out current getty settings
-sed -i -e '/^c[0-9]/ s/^/#/' /etc/inittab
-
-# Add our own getty settings
-for x in 1 2 3 4 5 6
-do
- echo "c${x}:12345:respawn:/sbin/agetty -nl /bin/bashlogin 38400 tty${x} linux" >> /etc/inittab
-done
-
-# perform any rcadd then any rcdel
-if [ -n "${clst_livecd_rcadd}" ] || [ -n "${clst_livecd_rcdel}" ]
-then
- if [ -n "${clst_livecd_rcadd}" ]
- then
- for x in ${clst_livecd_rcadd}
- do
- rc-update add "${x%%:*}" "${x##*:}"
- done
- fi
-
- if [ -n "${clst_livecd_rcdel}" ]
- then
- for x in ${clst_livecd_rcdel}
- do
- rc-update del "${x%%:*}" "${x##*:}"
- done
- fi
-fi
-
-# clean up the time and set to GMT
-rm -rf /etc/localtime
-cp /usr/share/zoneinfo/GMT /etc/localtime
-
-# setup the hostname
-echo "livecd" > /etc/hostname
-echo "gentoo" > /etc/dnsdomainname
-#sed -i 's:localhost:livecd.gentoo localhost:' /etc/hosts
-echo "127.0.0.1 livecd.gentoo livecd localhost" > /etc/hosts
-
-# setup sudoers
-[ -e /etc/sudoers ] && sed -i '/NOPASSWD: ALL/ s/^# //' /etc/sudoers
-
-# setup dhcp on all detected ethernet devices
-echo "iface_eth0=\"dhcp\""> /etc/conf.d/net
-echo "iface_eth1=\"dhcp\"" >> /etc/conf.d/net
-echo "iface_eth2=\"dhcp\"" >> /etc/conf.d/net
-echo "iface_eth3=\"dhcp\"" >> /etc/conf.d/net
-echo "iface_eth4=\"dhcp\"" >> /etc/conf.d/net
-
-# setup links for ethernet devices
-cd /etc/init.d
-ln -sf net.eth0 net.eth1
-ln -sf net.eth0 net.eth2
-ln -sf net.eth0 net.eth3
-ln -sf net.eth0 net.eth4
-
-# add this for hwsetup/mkx86config
-mkdir -p /etc/sysconfig
-
-# fstab tweaks
-echo "tmpfs / tmpfs defaults 0 0" > /etc/fstab
-echo "tmpfs /lib/firmware tmpfs defaults 0 0" >> /etc/fstab
-echo "tmpfs /usr/portage tmpfs defaults 0 0" >> /etc/fstab
-# if /usr/lib/X11/xkb/compiled then make it tmpfs
-if [ -d /usr/lib/X11/xkb/compiled ]
-then
- echo "tmpfs /usr/lib/X11/xkb/compiled tmpfs defaults 0 0" >> /etc/fstab
-fi
-
-# devfs tweaks
-sed -i '/dev-state/ s:^:#:' /etc/devfsd.conf
-
-# tweak the livecd fstab so that users know not to edit it
-# http://bugs.gentoo.org/show_bug.cgi?id=60887
-mv /etc/fstab /etc/fstab.old
-echo "####################################################" >> /etc/fstab
-echo "## ATTENTION: THIS IS THE FSTAB ON THE LIVECD ##" >> /etc/fstab
-echo "## PLEASE EDIT THE FSTAB at /mnt/gentoo/etc/fstab ##" >> /etc/fstab
-echo "####################################################" >> /etc/fstab
-cat /etc/fstab.old >> /etc/fstab
-rm /etc/fstab.old
-
-# add some helpful aliases
-echo "alias cp='cp -i'" >> /etc/profile
-echo "alias mv='mv -i'" >> /etc/profile
-echo "alias rm='rm -i'" >> /etc/profile
-echo "alias ls='ls --color=auto'" >> /etc/profile
-echo "alias grep='grep --color=auto'" >> /etc/profile
-
-# make sure we have the latest pci and hotplug ids
-if [ -d /usr/share/hwdata ]
-then
- [ -f /usr/share/hwdata/pci.ids ] && rm -f /usr/share/hwdata/pci.ids
- [ -f /usr/share/hwdata/usb.ids ] && rm -f /usr/share/hwdata/usb.ids
- ln -s /usr/share/misc/pci.ids /usr/share/hwdata/pci.ids
- ln -s /usr/share/misc/usb.ids /usr/share/hwdata/usb.ids
-fi
-
-# setup opengl in /etc (if configured)
-[ -x /usr/sbin/openglify ] && /usr/sbin/openglify
-
-# touch /etc/asound.state if alsa is configured
-[ -d /proc/asound/card0 ] && touch /etc/asound.state
-
-# tweak the motd for gentoo releases
-if [ "${clst_livecd_type}" = "gentoo-release-universal" ]
-then
- cat /etc/generic.motd.txt /etc/universal.motd.txt \
- /etc/minimal.motd.txt > /etc/motd
- sed -i 's:^##GREETING:Welcome to the Gentoo Linux Universal Installation CD!:' /etc/motd
-fi
-
-if [ "${clst_livecd_type}" = "gentoo-release-minimal" ]
-then
- cat /etc/generic.motd.txt /etc/minimal.motd.txt > /etc/motd
- sed -i 's:^##GREETING:Welcome to the Gentoo Linux Minimal Installation CD!:' /etc/motd
-fi
-
-if [ "${clst_livecd_type}" = "gentoo-release-environmental" ]
-then
- cat /etc/generic.motd.txt /etc/universal.motd.txt \
- /etc/minimal.motd.txt /etc/environmental.motd.txt > /etc/motd
- sed -i 's:^##GREETING:Welcome to the Gentoo Linux LiveCD Environment!:' /etc/motd
-fi
-
-if [ "${clst_livecd_type}" = "gentoo-gamecd" ]
-then
- cat /etc/generic.motd.txt /etc/gamecd.motd.txt > /etc/motd
- sed -i 's:^##GREETING:Welcome to the Gentoo Linux ##GAME_NAME GameCD!:' /etc/motd
-fi
-
-rm -f /etc/generic.motd.txt /etc/universal.motd.txt /etc/minimal.motd.txt /etc/environmental.motd.txt /etc/gamecd.motd.txt
-
-# setup splash/bootsplash (if called for)
-if [ "${clst_livecd_splash_type}" == "bootsplash" -a -n "${clst_livecd_splash_theme}" ]
-then
- if [ -d /etc/bootsplash/${clst_livecd_splash_theme} ]
- then
- sed -i 's:BOOTSPLASH_THEME=\"gentoo\":BOOTSPLASH_THEME=\"${clst_livecd_splash_theme}\":' /etc/conf.d/bootsplash
- rm /etc/bootsplash/default
- ln -s "/etc/bootsplash/${clst_livecd_splash_theme}" /etc/bootsplash/default
- else
- echo "Error, cannot setup bootsplash theme ${clst_livecd_splash_theme}"
- exit 1
- fi
-
-elif [ "${clst_livecd_splash_type}" == "gensplash" -a -n "${clst_livecd_splash_theme}" ]
-then
- if [ -d /etc/splash/${clst_livecd_splash_theme} ]
- then
- sed -i 's:# SPLASH_THEME="gentoo":SPLASH_THEME=\"${clst_livecd_splash_theme}\":' /etc/conf.d/splash
- rm /etc/splash/default
- ln -s /etc/splash/${clst_livecd_splash_theme} /etc/splash/default
- else
- echo "Error, cannot setup splash theme ${clst_livecd_splash_theme}"
- exit 1
- fi
-fi
-
-# Create firmware directory if it does not exist
-[ ! -d /lib/firmware ] && mkdir -p /lib/firmware
-
-# tar up the firmware so that it does not get clobbered by the livecd mounts
-if [ -n "$(ls /lib/firmware)" ]
-then
- cd /lib/firmware
- if [ -n "$(ls /usr/lib/hotplug/firmware)" ]
- then
- cp /usr/lib/hotplug/firmware/* /lib/firmware
- fi
- tar cvjpf /lib/firmware.tar.bz2 .
- rm -f /lib/firmware/*
- mkdir -p /usr/lib/hotplug
- ln -sf /lib/firmware /usr/lib/hotplug/firmware
-fi
+++ /dev/null
-#!/bin/bash
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/post-kmerge.sh,v 1.4 2005/02/28 23:21:09 wolf31o2 Exp $
-
-/usr/sbin/env-update
-source /etc/profile
-
-#emerge -C genkernel
-
-/sbin/depscan.sh
-find /lib/modules -name modules.dep -exec touch {} \;
+++ /dev/null
-#!/bin/bash
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript-support/Attic/pre-kmerge.sh,v 1.12 2005/03/29 17:09:49 wolf31o2 Exp $
-
-/usr/sbin/env-update
-source /etc/profile
-
-if [ ! -x /usr/share/genkernel/genkernel ]
-then
- emerge -k -b genkernel
-fi
-
-install -d /usr/portage/packages/gk_binaries
-rm -f /usr/src/linux
-
-if [ "${clst_livecd_type}" = "gentoo-release-minimal" ] \
-|| [ "${clst_livecd_type}" = "gentoo-release-universal" ]
-then
- sed -i 's/initramfs_data.cpio.gz /initramfs_data.cpio.gz -r 1024x768 /'\
- /usr/share/genkernel/genkernel
-fi
+++ /dev/null
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/alpha-archscript.sh,v 1.10 2005/03/09 00:22:05 wolf31o2 Exp $
-
-case $1 in
- kernel)
- ;;
-
- preclean)
- # Add entries for ttyS0 and ttyS1 to /etc/inittab.
- echo "t0:12345:respawn:/sbin/agetty -L 9600 ttyS0 vt100" >> ${clst_chroot_path}/etc/inittab
- echo "t1:12345:respawn:/sbin/agetty -L 9600 ttyS1 vt100" >> ${clst_chroot_path}/etc/inittab
- ;;
-
- clean)
- ;;
-
- bootloader)
- # Create a filesystem tree for the ISO at
- # ${clst_cdroot_path}. We extract the "cdtar" to this directory,
- # which will normally contains a pre-built binary
- # boot-loader/filesystem skeleton for the ISO.
-
- cdtar=${clst_livecd_cdtar}
- [ -z "$cdtar" ] && die "Required key livecd/cdtar not specified, exiting"
- tar xjpvf ${cdtar} -C ${clst_cdroot_path} || die "Couldn't extract cdtar ${cdtar}"
- # Here is where we poke in our identifier
- touch ${clst_cdroot_path}/livecd
- [ -z "${clst_boot_kernel}" ] && die "Required key boot/kernel not specified, exiting"
-
- # unpack the kernel(s) that were built in kmerge.sh
- first=""
- for x in ${clst_boot_kernel}
- do
- kbinary="${clst_chroot_path}/usr/portage/packages/gk_binaries/${x}-${clst_version_stamp}.tar.bz2"
- [ ! -e "${kbinary}" ] && die "Can't find kernel tarball at ${kbinary}"
-
- tar xjvf ${kbinary} -C ${clst_cdroot_path}/boot
-
- # change kernel name from "kernel" to "gentoo", for example
- mv ${clst_cdroot_path}/boot/kernel* ${clst_cdroot_path}/boot/${x}
-
- # change initrd name from "initrd" to "gentoo.igz", for example
- mv ${clst_cdroot_path}/boot/initrd* ${clst_cdroot_path}/boot/${x}.igz
- done
-
- # figure out what device manager we are using and handle it accordingly
- if [ "${clst_livecd_devmanager}" == "udev" ]
- then
- cmdline_opts="${cmdline_opts} udev nodevfs"
- else
- cmdline_opts="${cmdline_opts} noudev devfs"
- fi
-
- acfg=${clst_cdroot_path}/etc/aboot.conf
- bctr=0
- for x in ${clst_boot_kernel}
- do
- echo -n "${bctr}:/boot/${x} " >> ${acfg}
- echo -n "initrd=/boot/${x}.igz root=/dev/ram0 " >> ${acfg}
- echo "init=/linuxrc ${cmdline_opts} cdroot" >> ${acfg}
- ((bctr=${bctr}+1))
- done
- ;;
-
- cdfs)
- ;;
-
- iso)
- # this is for the livecd-final target, and calls the proper
- # command to build the iso file
- case ${clst_livecd_cdfstype} in
- zisofs)
- mkisofs -J -R -l -z -V "${iso_volume_id}" -o ${2} ${clst_cdroot_path} || die "Cannot make ISO image"
- ;;
- *)
- mkisofs -J -R -l -o ${2} ${clst_cdroot_path} || die "Cannot make ISO image"
- ;;
- esac
- isomarkboot ${2} /boot/bootlx
- ;;
-esac
+++ /dev/null
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/default-runscript.sh,v 1.25 2005/03/29 18:53:32 wolf31o2 Exp $
-
-#return codes to be used by archscript
-die() {
- echo "$1"
- exit 1
-}
-
-case ${clst_livecd_cdfstype} in
- zisofs)
- cmdline_opts="looptype=zisofs loop=/zisofs"
- ;;
- normal)
- cmdline_opts="looptype=normal loop=/livecd.loop"
- ;;
- noloop)
- cmdline_opts="looptype=noloop"
- ;;
- squashfs)
- cmdline_opts="looptype=squashfs loop=/livecd.squashfs"
- ;;
- gcloop)
- cmdline_opts="looptype=gcloop loop=/livecd.gcloop"
- ;;
-esac
-
-source ${clst_livecd_archscript}
-
-create_normal_loop() {
-
- #We get genkernel-built kernels and initrds in place, create the loopback fs on
- #$clst_cdroot_path, mount it, copy our bootable filesystem over, umount it, and
- #we then have a ready-to-burn ISO tree at $clst_cdroot_path.
-
- echo "Calculating size of loopback filesystem..."
- loopsize=`du -ks ${clst_chroot_path} | cut -f1`
- [ "${loopsize}" = "0" ] && loopsize=1
- # Add 4MB for filesystem slop
- loopsize=`expr ${loopsize} + 4096`
- echo "Creating loopback file..."
- dd if=/dev/zero of=${clst_cdroot_path}/livecd.loop bs=1k count=${loopsize} || die "livecd.loop creation failure"
- mke2fs -m 0 -F -q ${clst_cdroot_path}/livecd.loop || die "Couldn't create ext2 filesystem"
- install -d ${clst_cdroot_path}/loopmount
- sync; sync; sleep 3 #try to work around 2.6.0+ loopback bug
- mount -t ext2 -o loop ${clst_cdroot_path}/livecd.loop ${clst_cdroot_path}/loopmount || die "Couldn't mount loopback ext2 filesystem"
- sync; sync; sleep 3 #try to work around 2.6.0+ loopback bug
- echo "cp -a ${clst_chroot_path}/* ${clst_cdroot_path}/loopmount"
- cp -a ${clst_chroot_path}/* ${clst_cdroot_path}/loopmount
-
- [ $? -ne 0 ] && { umount ${clst_cdroot_path}/loopmount; die "Couldn't copy files to loopback ext2 filesystem"; }
- umount ${clst_cdroot_path}/loopmount || die "Couldn't unmount loopback ext2 filesystem"
- rm -rf ${clst_cdroot_path}/loopmount
- #now, $clst_cdroot_path should contain a proper bootable image for our iso, including
- #boot loader and loopback filesystem.
-}
-
-create_zisofs() {
-
- rm -rf "${clst_cdroot_path}/zisofs" > /dev/null 2>&1
- echo "Creating zisofs..."
- mkzftree -z 9 -p2 "${clst_chroot_path}" "${clst_cdroot_path}/zisofs" || die "Could not run mkzftree, did you emerge zisofs"
-
-}
-
-create_noloop() {
-
- echo "Copying files for image (no loop)..."
- cp -a "${clst_chroot_path}"/* "${clst_cdroot_path}" || die "Could not copy files to image (no loop)"
-
-}
-
-create_gcloop() {
- create_normal_loop
- compress_gcloop_ucl -b 131072 -c 10 "${clst_cdroot_path}/livecd.loop" "${clst_cdroot_path}/livecd.gcloop" || die "compress_gcloop_ucl failed, did you emerge gcloop?"
- rm -f "${clst_cdroot_path}/livecd.loop"
- # only a gcloop image should exist in cdroot path
-
-}
-
-create_squashfs() {
- echo "Creating squashfs..."
- mksquashfs "${clst_chroot_path}" "${clst_cdroot_path}/livecd.squashfs" -noappend || die "mksquashfs failed, did you emerge squashfs-tools?"
-
-}
-
-## START RUNSCRIPT
-
-case $1 in
- kernel)
- shift
- numkernels="$1"
- shift
-
- # setup genkernel and do any pre-kernel merge opts
- cp -a ${clst_sharedir}/livecd/runscript-support/pre-kmerge.sh ${clst_chroot_path}/tmp
- ${clst_CHROOT} ${clst_chroot_path} /tmp/pre-kmerge.sh || exit 1
- rm -f ${clst_chroot_path}/tmp/pre-kmerge.sh
-
- # the kernel merge process is done in a chroot
- cp -a ${clst_sharedir}/livecd/runscript-support/kmerge.sh ${clst_chroot_path}/tmp
- count=0
- while [ ${count} -lt ${numkernels} ]
- do
- export clst_kname="$1"
- shift
- export clst_ksource="$1"
- shift
- export clst_kextversion="$1"
- shift
- ${clst_CHROOT} ${clst_chroot_path} /tmp/kmerge.sh || exit 1
- count=$(( ${count} + 1 ))
- done
- rm -f ${clst_chroot_path}/tmp/kmerge.sh
-
- # clean up genkernel and do any post-kernel merge opts
- cp -a ${clst_sharedir}/livecd/runscript-support/post-kmerge.sh ${clst_chroot_path}/tmp
- ${clst_CHROOT} ${clst_chroot_path} /tmp/post-kmerge.sh || exit 1
- rm -f ${clst_chroot_path}/tmp/post-kmerge.sh
- ;;
-
- preclean)
- # move over the motd (if applicable)
- if [ -n "${clst_livecd_motd}" ]
- then
- cp -a ${clst_livecd_motd} ${clst_chroot_path}/etc/motd
- else
- cp -a ${clst_sharedir}/livecd/files/generic.motd.txt \
- ${clst_sharedir}/livecd/files/universal.motd.txt \
- ${clst_sharedir}/livecd/files/minimal.motd.txt \
- ${clst_sharedir}/livecd/files/environmental.motd.txt \
- ${clst_sharedir}/livecd/files/gamecd.motd.txt \
- ${clst_chroot_path}/etc
- fi
-
- # move over the xinitrc (if applicable)
- if [ -n "${clst_livecd_xinitrc}" ]
- then
- cp -a ${clst_livecd_xinitrc} ${clst_chroot_path}/etc/X11/xinit/xinitrc
- fi
-
- # move over the environment
- cp ${clst_sharedir}/livecd/files/livecd-bashrc \
- ${clst_chroot_path}/root/.bashrc
- cp ${clst_sharedir}/livecd/files/livecd-bash_profile \
- ${clst_chroot_path}/root/.bash_profile
- cp ${clst_sharedir}/livecd/files/livecd-local.start \
- ${clst_chroot_path}/etc/conf.d/local.start
- mkdir -p /usr/share/faces
- cp ${clst_sharedir}/livecd/files/gentoo.png \
- ${clst_chroot_path}/usr/share/faces
-
- # touch /etc/startx if our livecd/type requires it
- if [ "${clst_livecd_type}" = "gentoo-gamecd" ] #\
- #|| [ "${clst_livecd_type}" = "gentoo-release-environmental" ]
- then
- touch ${clst_chroot_path}/etc/startx
- fi
-
- # now, finalize and tweak the livecd fs (inside of the chroot)
- cp ${clst_sharedir}/livecd/runscript-support/livecdfs-update.sh ${clst_chroot_path}/tmp
- ${clst_CHROOT} ${clst_chroot_path} /tmp/livecdfs-update.sh || exit 1
- rm -f ${clst_chroot_path}/tmp/livecdfs-update.sh
-
- # execute gamecdfs-update.sh if we're a gamecd
- if [ "${clst_livecd_type}" = "gentoo-gamecd" ]
- then
- cp ${clst_sharedir}/livecd/runscript-support/gamecdfs-update.sh ${clst_chroot_path}/tmp
- ${clst_CHROOT} ${clst_chroot_path} /tmp/gamecdfs-update.sh || exit 1
- rm -f ${clst_chroot_path}/tmp/gamecdfs-update.sh
- fi
-
- # if the user has their own fs update script, execute it
- if [ -n "${clst_livecd_fsscript}" ]
- then
- cp ${clst_livecd_fsscript} ${clst_chroot_path}/tmp/fsscript.sh
- chmod 755 ${clst_chroot_path}/tmp/fsscript.sh
- ${clst_CHROOT} ${clst_chroot_path} /tmp/fsscript.sh || exit 1
- rm -f ${clst_chroot_path}/tmp/fsscript.sh
- fi
- ;;
-
- clean)
- find ${clst_chroot_path}/usr/lib -iname "*.pyc" -exec rm -f {} \;
- ;;
-
- bootloader)
- ;;
-
- cdfs)
- loopret=1
- if [ "${clst_livecd_cdfstype}" = "normal" ]
- then
- create_normal_loop
- loopret=$?
- elif [ "${clst_livecd_cdfstype}" = "zisofs" ]
- then
- create_zisofs
- loopret=$?
- elif [ "${clst_livecd_cdfstype}" = "noloop" ]
- then
- create_noloop
- loopret=$?
- elif [ "${clst_livecd_cdfstype}" = "gcloop" ]
- then
- create_gcloop
- loopret=$?
- elif [ "${clst_livecd_cdfstype}" = "squashfs" ]
- then
- create_squashfs
- loopret=$?
- fi
- exit $loopret
- ;;
-
- iso)
- ;;
-esac
-exit 0
+++ /dev/null
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/hppa-archscript.sh,v 1.9 2005/03/09 00:22:05 wolf31o2 Exp $
-
-case $1 in
- kernel)
- ;;
-
- preclean)
- ;;
-
- clean)
- ;;
-
- bootloader)
- # CDFSTYPE and loop_opts are exported from the default
- # runscript
-
- # Create a filesystem tree for the ISO at $clst_cdroot_path.
- # We extract the "cdtar" to this directory, which will normally contains a pre-built
- # binary boot-loader/filesystem skeleton for the ISO.
-
- cdtar=${clst_livecd_cdtar}
- [ -z "$cdtar" ] && die "Required key livecd/cdtar not specified, exiting"
- tar xjpvf ${cdtar} -C ${clst_cdroot_path} || die "Couldn't extract cdtar ${cdtar}"
- # Here is where we poke in our identifier
- touch ${clst_cdroot_path}/livecd
- [ -z "$clst_boot_kernel" ] && die "Required key boot/kernel not specified, exiting"
-
- # install our kernel(s) that were built in kmerge.sh
- first=""
- for x in ${clst_boot_kernel}
- do
- kbinary="${clst_chroot_path}/usr/portage/packages/gk_binaries/${x}-${clst_version_stamp}.tar.bz2"
- if [ -z "$first" ]
- then
- # grab name of first kernel
- first="${x}"
- fi
- [ ! -e "${kbinary}" ] && die "Can't find kernel tarball at ${kbinary}"
- tar xjvf ${kbinary} -C ${clst_cdroot_path}/boot
- done
-
- # figure out what device manager we are using and handle it accordingly
- if [ "${clst_livecd_devmanager}" == "udev" ]
- then
- cmdline_opts="${cmdline_opts} udev nodevfs"
- else
- cmdline_opts="${cmdline_opts} noudev devfs"
- fi
-
- # THIS SHOULD BE IMPROVED !
- mv ${clst_cdroot_path}/boot/kernel* ${clst_cdroot_path}/vmlinux
- mv ${clst_cdroot_path}/boot/initrd* ${clst_cdroot_path}/initrd
- icfg=${clst_cdroot_path}/boot/palo.conf
- kmsg=${clst_cdroot_path}/boot/kernels.msg
- hmsg=${clst_cdroot_path}/boot/help.msg
- echo "--commandline=0/${first} initrd=${x}.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts}" >> ${icfg}
- echo "--bootloader=boot/iplboot" >> ${icfg}
- echo "--ramdisk=boot/${x}.igz" >> ${icfg}
-
-# for x in $clst_boot_kernel
-# do
-#
-# eval custom_kopts=\$${x}_kernelopts
-# echo "APPENDING CUSTOM KERNEL ARGS: ${custom_kopts}"
-# echo >> $icfg
-# echo "label $x" >> $icfg
-# echo " kernel $x" >> $icfg
-# echo " append initrd=$x.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts} ${custom_kopts} cdroot vga=0x317 splash=silent" >> $icfg
-# echo >> $icfg
-# echo " $x" >> $kmsg
-# echo "label $x-nofb" >> $icfg
-# echo " kernel $x" >> $icfg
-# echo " append initrd=$x.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts} ${custom_kopts} cdroot" >> $icfg
-# echo >> $icfg
-# echo " ${x}-nofb" >> $kmsg
-# done
- ;;
-
- cdfs)
- ;;
-
- iso)
- #this is for the livecd-stage2 target, and calls the proper command to build the iso file
- mkisofs -J -R -l -V "${iso_volume_id} -o ${2} ${clst_cdroot_path} || die "Cannot make ISO image"
- palo -f boot/palo.conf -C ${2}
- ;;
-esac
+++ /dev/null
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/ppc-archscript.sh,v 1.10 2005/03/19 17:46:39 wolf31o2 Exp $
-
-case $1 in
- kernel)
- ;;
-
- preclean)
- ;;
-
- clean)
- ;;
-
- bootloader)
- # PPC requirements:
- # -----------------
- # The specs indicate the kernels to be build. We need to put
- # those kernels and the corresponding initrd.img.gz(s) in the
- # /boot directory. This directory contains a message boot.msg
- # containing some info to be displayed on boot, a configuration
- # (yaboot.conf) specifying the boot options (kernel/initrd
- # combinations). The boot directory also contains a file called
- # yaboot, which normally gets copied from the live environment.
- # For now we supply a prebuilt file, prebuilt configuration
- # and prebuilt boot message. This can be enhanced later on
- # but the following suffices for now:
-
- cdtar=${clst_livecd_cdtar}
- [ -z "${cdtar}" ] && die "Required key livecd/cdtar not defined, exiting"
- tar xjpvf ${cdtar} -C ${clst_cdroot_path} || die "Couldn't extract cdtar ${cdtar}"
- # Here is where we poke in our identifier
- touch ${clst_cdroot_path}/livecd
- [ -z "${clst_boot_kernel}" ] && die "Required key boot/kernel not defined, exiting."
-
- first=""
- for x in ${clst_boot_kernel}
- do
- kbinary="${clst_chroot_path}/usr/portage/packages/gk_binaries/${x}-${clst_version_stamp}.tar.bz2"
- if [ -z "${first}" ]
- then
- # grab name of first kernel
- first="${x}"
- fi
- [ ! -e "${kbinary}" ] && die "Can't find kernel tarball at ${kbinary}"
- tar xjvf ${kbinary} -C ${clst_cdroot_path}/boot
-
- # change kernel name from "kernel" to "gentoo", for example
- mv ${clst_cdroot_path}/boot/kernel* ${clst_cdroot_path}/boot/${x}
-
- # change initrd name from "initrd" to "gentoo.igz", for example
- mv ${clst_cdroot_path}/boot/initrd* ${clst_cdroot_path}/boot/${x}.igz
- done
- ;;
-
- cdfs)
- ;;
-
- iso)
- # The name of the iso should be retrieved from the specs.
- mkisofs -J -r -l -netatalk -hfs -probe -map ${clst_cdroot_path}/boot/map.hfs -part -no-desktop -hfs-volid "${iso_volume_id}" -hfs-bless ${clst_cdroot_path}/boot -V "${iso_volume_id}" -o ${2} ${clst_cdroot_path}
- ;;
-esac
+++ /dev/null
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/sparc-archscript.sh,v 1.11 2005/03/09 00:22:05 wolf31o2 Exp $
-
-case $1 in
- kernel)
- ;;
-
- preclean)
- ;;
-
- clean)
- ;;
-
- bootloader)
- # Create a filesystem tree for the ISO at
- # $clst_cdroot_path. We extract the "cdtar" to this directory,
- # which will normally contains a pre-built binary
- # boot-loader/filesystem skeleton for the ISO.
-
- cdtar=${clst_livecd_cdtar}
- [ -z "$cdtar" ] && die "Required key livecd/cdtar not defined, exiting"
- tar xjpvf ${cdtar} -C ${clst_cdroot_path} || die "Couldn't extract cdtar ${cdtar}"
- # Here is where we poke in our identifier
- touch ${clst_cdroot_path}/livecd
- [ -z "$clst_boot_kernel" ] && die "Required key boot/kernel not defined, exiting"
-
- # install the kernels built in kmerge.sh
- first=""
- for x in ${clst_boot_kernel}
- do
- kbinary="${clst_chroot_path}/usr/portage/packages/gk_binaries/${x}-${clst_version_stamp}.tar.bz2"
-
- if [ -z "${first}" ]
- then
- # grab name of first kernel
- first="${x}"
- fi
-
- [ ! -e "${kbinary}" ] && die "Can't find kernel tarball at ${kbinary}"
- tar xjvf ${kbinary} -C ${clst_cdroot_path}/boot
-
- # change kernel name from "kernel" to "gentoo", for example
- mv ${clst_cdroot_path}/boot/kernel-* ${clst_cdroot_path}/boot/${x}
-
- # change initrd name from "initrd" to "gentoo.igz", for example
- mv ${clst_cdroot_path}/boot/initrd* ${clst_cdroot_path}/boot/${x}.igz
- done
-
- # figure out what device manager we are using and handle it accordingly
- if [ "${clst_livecd_devmanager}" == "udev" ]
- then
- cmdline_opts="${cmdline_opts} udev nodevfs"
- else
- cmdline_opts="${cmdline_opts} noudev devfs"
- fi
-
- scfg=${clst_cdroot_path}/boot/silo.conf
- echo "default=\"help\"" > ${scfg}
- echo "message=\"/boot/boot.msg\"" >> ${scfg}
-
- for x in ${clst_boot_kernel}
- do
- echo >> ${icfg}
- echo "image=\"/boot/${x}\"" >> ${scfg}
- echo -e "\tlabel=\"${x}\"" >> ${scfg}
- echo -e "\tappend=\"initrd=/boot/${x}.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts} cdroot\"" >> ${scfg}
-
- done
-
- echo "image=\"cat /boot/silo.conf\"" >> ${scfg}
- echo -e "label=\"config\"" >> ${scfg}
- echo "image=\"cat /boot/video.msg\"" >> ${scfg}
- echo -e "label=\"video\"" >> ${scfg}
- echo "image=\"cat /boot/help.msg\"" >> ${scfg}
- echo -e "label=\"help\"" >> ${scfg}
- ;;
-
- cdfs)
- ;;
-
- iso)
- # Old silo + patched mkisofs fubar magic
- # Only silo 1.2.x seems to work for most hardware
- # Seems silo 1.3.x+ breaks on newer machines
- # when booting from CD (current as of silo 1.4.8)
- mv ${clst_cdroot_path}/boot/mkisofs.sparc.fu /tmp
- /tmp/mkisofs.sparc.fu -o ${2} -D -r -pad -quiet -S 'boot/cd.b' -B '/boot/second.b' -s '/boot/silo.conf' -V "${iso_volume_id}" ${clst_cdroot_path} || die "Cannot make ISO image"
- rm /tmp/mkisofs.sparc.fu
- ;;
-esac
+++ /dev/null
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/livecd/runscript/Attic/x86-archscript.sh,v 1.24 2005/03/09 00:22:05 wolf31o2 Exp $
-
-case $1 in
- kernel)
- ;;
-
- preclean)
- ;;
-
- clean)
- ;;
-
- bootloader)
- # CDFSTYPE and loop_opts are exported from the default
- # runscript
-
- # Time to create a filesystem tree for the ISO at $clst_cdroot_path.
- # We extract the "cdtar" to this directory, which will normally contains a pre-built
- # binary boot-loader/filesystem skeleton for the ISO.
-
- cdtar=${clst_livecd_cdtar}
- [ -z "${cdtar}" ] && die "Required key livecd/cdtar not defined, exiting"
- tar xjpvf ${cdtar} -C ${clst_cdroot_path} || die "Couldn't extract cdtar ${cdtar}"
- # Here is where we poke in our identifier
- touch ${clst_cdroot_path}/livecd
- [ -z "${clst_boot_kernel}" ] && die "Required key boot/kernel not defined, exiting."
-
- first=""
- for x in ${clst_boot_kernel}
- do
- kbinary="${clst_chroot_path}/usr/portage/packages/gk_binaries/${x}-${clst_version_stamp}.tar.bz2"
-
- if [ -z "${first}" ]
- then
- # grab name of first kernel
- first="${x}"
- fi
-
- # unpack the kernel that was compiled in kmerge.sh
- [ ! -e "${kbinary}" ] && die "Can't find kernel tarball at ${kbinary}"
- tar xjvf "${kbinary}" -C "${clst_cdroot_path}"/isolinux
-
- #change kernel name from "kernel" to "gentoo", for example
- mv "${clst_cdroot_path}"/isolinux/kernel* "${clst_cdroot_path}"/isolinux/"${x}"
-
- #change initrd name from "initrd" to "gentoo.igz", for example
- mv "${clst_cdroot_path}"/isolinux/initrd* "${clst_cdroot_path}"/isolinux/"${x}".igz
- done
-
- # the rest of this function sets up the config file for isolinux
- icfg=${clst_cdroot_path}/isolinux/isolinux.cfg
- kmsg=${clst_cdroot_path}/isolinux/kernels.msg
- hmsg=${clst_cdroot_path}/isolinux/help.msg
- echo "default ${first}" > ${icfg}
- echo "timeout 150" >> ${icfg}
- echo "prompt 1" >> ${icfg}
- echo "display boot.msg" >> ${icfg}
- echo "F1 kernels.msg" >> ${icfg}
- echo "F2 help.msg" >> ${icfg}
-
- # figure out what device manager we are using and handle it accordingly
- if [ "${clst_livecd_devmanager}" == "udev" ]
- then
- cmdline_opts="${cmdline_opts} udev nodevfs"
- else
- cmdline_opts="${cmdline_opts} noudev devfs"
- fi
-
- echo "Available kernels:" > ${kmsg}
- cp ${clst_sharedir}/livecd/files/x86-help.msg ${hmsg}
-
- for x in ${clst_boot_kernel}
- do
-
- eval custom_kopts=\$${x}_kernelopts
- echo "APPENDING CUSTOM KERNEL ARGS: ${custom_kopts}"
- echo >> ${icfg}
- echo "label ${x}" >> ${icfg}
- echo " kernel ${x}" >> ${icfg}
-
- if [ "${clst_livecd_splash_type}" == "gensplash" -a -n "${clst_livecd_splash_theme}" ]
- then
- echo " append initrd=${x}.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts} ${custom_kopts} cdroot vga=791 dokeymap splash=silent,theme:${clst_livecd_splash_theme}" >> ${icfg}
- else
- echo " append initrd=${x}.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts} ${custom_kopts} cdroot vga=791 dokeymap splash=silent" >> ${icfg}
- fi
-
- echo >> ${icfg}
- echo " ${x}" >> ${kmsg}
- echo "label ${x}-nofb" >> ${icfg}
- echo " kernel ${x}" >> ${icfg}
- echo " append initrd=${x}.igz root=/dev/ram0 init=/linuxrc ${cmdline_opts} ${custom_kopts} cdroot" >> ${icfg}
- echo >> ${icfg}
- echo " ${x}-nofb" >> ${kmsg}
- done
-
- if [ -f ${clst_cdroot_path}/isolinux/memtest86 ]
- then
- echo >> $icfg
- echo " memtest86" >> $kmsg
- echo "label memtest86" >> $icfg
- echo " kernel memtest86" >> $icfg
- fi
- ;;
-
- cdfs)
- ;;
-
- iso)
- #this is for the livecd-stage2 target, and calls the proper command
- # to build the iso file
- case ${clst_livecd_cdfstype} in
- zisofs)
- mkisofs -J -R -l -V "${iso_volume_id}" -o ${2} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -z ${clst_cdroot_path} || die "Cannot make ISO image"
- ;;
- *)
- mkisofs -J -R -l -V "${iso_volume_id}" -o ${2} -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table ${clst_cdroot_path} || die "Cannot make ISO image"
- ;;
- esac
- ;;
-esac