# ChangeLog for gentoo/src/catalyst
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.215 2005/04/09 12:49:16 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.216 2005/04/11 20:05:40 rocket Exp $
+
+ 11 Apr 2005; Eric Edgar <rocket@gentoo.org>
+ modules/generic_stage_target.py, modules/livecd_stage1_target.py,
+ modules/livecd_stage2_target.py, modules/stage4_target.py,
+ targets/livecd-stage1/livecd-stage1-controller.sh,
+ targets/livecd-stage2/livecd-stage2-controller.sh,
+ targets/stage4/stage4-controller.sh, +targets/stage4/unmerge.sh,
+ targets/support/functions.sh, targets/support/kmerge.sh,
+ targets/support/livecdfs-update.sh, +targets/support/rc-update.sh:
+ Generalized kernel support, fsscript, rcupdate, etc for stage4
09 Apr 2005; Chris Gianelloni <wolf31o2@gentoo.org>
targets/support/pre-kmerge.sh:
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.27 2005/04/07 23:02:20 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/generic_stage_target.py,v 1.28 2005/04/11 20:05:40 rocket Exp $
"""
This class does all of the chroot setup, copying of files, etc. It is
else:
print "Building on",self.settings["hostarch"],"for alternate machine type",\
self.settings["mainarch"]
+ # This should be first to be set as other set_ options depend on this
+ self.set_spec_prefix()
+
# define all of our core variables
self.set_target_profile()
self.set_action_sequence()
self.set_use()
self.set_cleanables()
- self.set_spec_prefix()
self.set_iso_volume_id()
+ self.set_build_kernel_vars(addlargs)
+ self.set_fsscript()
+ self.set_rcadd()
+ self.set_rcdel()
# this next line checks to make sure that the specified variables exist on disk.
file_locate(self.settings,["source_path","snapshot_path","distdir"],expand=0)
def set_target_path(self):
self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]+".tar.bz2"
+
+ def set_fsscript(self):
+ if self.settings.has_key(self.settings["spec_prefix"]+"/fsscript"):
+ self.settings["fsscript"]=self.settings[self.settings["spec_prefix"]+"/fsscript"]
+ del self.settings[self.settings["spec_prefix"]+"/fsscript"]
+ def set_rcadd(self):
+ if self.settings.has_key(self.settings["spec_prefix"]+"/rcadd"):
+ self.settings["rcadd"]=self.settings[self.settings["spec_prefix"]+"/rcadd"]
+ del self.settings[self.settings["spec_prefix"]+"/rcadd"]
+
+ def set_rcdel(self):
+ if self.settings.has_key(self.settings["spec_prefix"]+"/rcdel"):
+ self.settings["rcdel"]=self.settings[self.settings["spec_prefix"]+"/rcdel"]
+ del self.settings[self.settings["spec_prefix"]+"/rcdel"]
+
def set_source_path(self):
self.settings["source_path"]=self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2"
if os.path.isfile(self.settings["source_path"]):
# ROOT= variable for emerges
self.settings["root_path"]="/"
+ def set_build_kernel_vars(self,addlargs):
+
+ if addlargs.has_key("boot/kernel"):
+ if type(addlargs["boot/kernel"]) == types.StringType:
+ loopy=[addlargs["boot/kernel"]]
+ else:
+ loopy=addlargs["boot/kernel"]
+
+ for x in loopy:
+ self.required_values.append("boot/kernel/"+x+"/sources")
+ self.required_values.append("boot/kernel/"+x+"/config")
+ self.valid_values.append("boot/kernel/"+x+"/extraversion")
+ self.valid_values.append("boot/kernel/"+x+"/packages")
+ self.valid_values.append("boot/kernel/"+x+"/use")
+ self.valid_values.append("boot/kernel/"+x+"/gk_kernargs")
+ self.valid_values.append("boot/kernel/"+x+"/gk_action")
+
+ if self.settings.has_key(self.settings["spec_prefix"]+"/devmanager"):
+ self.settings["devmanager"]=self.settings[self.settings["spec_prefix"]+"/devmanager"]
+ del self.settings[self.settings["spec_prefix"]+"/devmanager"]
+
+ if self.settings.has_key(self.settings["spec_prefix"]+"/splashtype"):
+ self.settings["splashtype"]=self.settings[self.settings["spec_prefix"]+"/splashtype"]
+ del self.settings[self.settings["spec_prefix"]+"/splashtype"]
+
+ if self.settings.has_key(self.settings["spec_prefix"]+"/gk_mainargs"):
+ self.settings["gk_mainargs"]=self.settings[self.settings["spec_prefix"]+"/gk_mainargs"]
+ del self.settings[self.settings["spec_prefix"]+"/gk_mainargs"]
+
def mount_safety_check(self):
mypath=self.settings["chroot_path"]
myf.write('PORTDIR_OVERLAY="'+string.join(self.settings["portage_overlay"])+'"\n')
myf.close()
+ def fsscript(self):
+ if self.settings.has_key("fsscript"):
+ if os.path.exists(self.settings["controller_file"]):
+ cmd("/bin/bash "+self.settings["controller_file"]+" fsscript","fsscript script failed.")
+
+ def rcupdate(self):
+ if self.settings.has_key("rcadd") or self.settings.has_key("rcdel"):
+ if os.path.exists(self.settings["controller_file"]):
+ cmd("/bin/bash "+self.settings["controller_file"]+" rc-update","rc-update script failed.")
+
def clean(self):
for x in self.settings["cleanables"]:
print "Cleaning chroot: "+x+"... "
cmd("/bin/bash "+self.settings["controller_file"]+" iso "+\
self.settings[self.settings["spec_prefix"]+"/iso"],"ISO creation script failed.")
def build_packages(self):
-
- if self.settings.has_key("AUTORESUME") \
- and os.path.exists(self.settings["chroot_path"]+"/tmp/.clst_build_packages"):
- print "Resume point detected, skipping build_packages operation..."
- else:
- mypack=list_bashify(self.settings[self.settings["spec_prefix"]+"/packages"])
- try:
- cmd("/bin/bash "+self.settings["controller_file"]+\
- " build_packages "+mypack)
- touch(self.settings["chroot_path"]+"/tmp/.clst_build_packages")
- except CatalystError:
- self.unbind()
- raise CatalystError,self.settings["spec_prefix"] + "build aborting due to error."
+ if self.settings.has_key(self.settings["spec_prefix"]+"/packages"):
+ if self.settings.has_key("AUTORESUME") \
+ and os.path.exists(self.settings["chroot_path"]+"/tmp/.clst_build_packages"):
+ print "Resume point detected, skipping build_packages operation..."
+ else:
+ mypack=list_bashify(self.settings[self.settings["spec_prefix"]+"/packages"])
+ try:
+ cmd("/bin/bash "+self.settings["controller_file"]+\
+ " build_packages "+mypack)
+ touch(self.settings["chroot_path"]+"/tmp/.clst_build_packages")
+ except CatalystError:
+ self.unbind()
+ raise CatalystError,self.settings["spec_prefix"] + "build aborting due to error."
def build_kernel(self):
if self.settings.has_key("boot/kernel"):
os.putenv(kname+"_kernelopts", "")
if not self.settings.has_key("boot/kernel/"+kname+"/extraversion"):
- self.settings["boot/kernel/"+kname+"/extraversion"]="NULL_VALUE"
+ self.settings["boot/kernel/"+kname+"/extraversion"]=""
os.putenv("clst_kextraversion", self.settings["boot/kernel/"+kname+"/extraversion"])
except CatalystError:
self.unbind()
raise CatalystError,"build aborting due to kernel build error."
-
- def set_build_kernel_vars(self,addlargs):
-
- if not addlargs.has_key("boot/kernel"):
- raise CatalystError, "Required value boot/kernel not specified."
-
- if type(addlargs["boot/kernel"]) == types.StringType:
- loopy=[addlargs["boot/kernel"]]
- else:
- loopy=addlargs["boot/kernel"]
-
- for x in loopy:
- self.required_values.append("boot/kernel/"+x+"/sources")
- self.required_values.append("boot/kernel/"+x+"/config")
- self.valid_values.append("boot/kernel/"+x+"/extraversion")
- self.valid_values.append("boot/kernel/"+x+"/packages")
- self.valid_values.append("boot/kernel/"+x+"/use")
- self.valid_values.append("boot/kernel/"+x+"/gk_kernargs")
- self.valid_values.append("boot/kernel/"+x+"/gk_action")
-
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage1_target.py,v 1.7 2005/04/04 17:48:32 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage1_target.py,v 1.8 2005/04/11 20:05:40 rocket Exp $
"""
Builder class for LiveCD stage1.
self.settings["action_sequence"]=["dir_setup","unpack","unpack_snapshot",\
"config_profile_link","setup_confdir","portage_overlay",\
"bind","chroot_setup","setup_environment","build_packages",\
- "preclean","clear_autoresume","unmerge","unbind",\
+ "preclean","fsscript","clear_autoresume","unmerge","unbind",\
"remove","empty","clean"]
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.31 2005/04/04 17:48:33 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.32 2005/04/11 20:05:40 rocket Exp $
"""
Builder class for a LiveCD stage2 build.
self.required_values=["boot/kernel","livecd/cdfstype"]
self.valid_values=[]
- self.set_build_kernel_vars(addlargs)
+
self.valid_values.extend(self.required_values)
self.valid_values.extend(["livecd/cdtar","livecd/empty","livecd/rm",\
"livecd/unmerge","livecd/iso","livecd/gk_mainargs","livecd/type",\
"gamecd/conf","portage_overlay"])
generic_stage_target.__init__(self,spec,addlargs)
+
file_locate(self.settings, ["livecd/cdtar","controller_file"])
- if self.settings.has_key("portage_confdir"):
- file_locate(self.settings,["portage_confdir"],expand=0)
+
def set_target_path(self):
self.settings["target_path"]=self.settings["storedir"]+"/builds/"+self.settings["target_subpath"]
self.settings["action_sequence"]=["dir_setup","unpack","unpack_snapshot",\
"config_profile_link","setup_confdir","portage_overlay",\
"bind","chroot_setup","setup_environment","run_local",\
- "root_overlay","build_kernel","bootloader","clear_autoresume",\
+ "root_overlay","build_kernel","bootloader","preclean",\
+ "fsscript","rcupdate","clear_autoresume",\
"unmerge","unbind","remove","empty","target_setup",\
"setup_overlay","create_iso"]
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage4_target.py,v 1.1 2005/04/04 17:48:33 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/modules/stage4_target.py,v 1.2 2005/04/11 20:05:40 rocket Exp $
"""
Builder class for LiveCD stage1.
class stage4_target(generic_stage_target):
def __init__(self,spec,addlargs):
- self.required_values=["stage4/packages","stage4/use"]
+ #self.required_values=["stage4/use"]
+ self.required_values=[]
self.valid_values=self.required_values[:]
- self.valid_values.append("stage4/root_overlay")
+ self.valid_values.extend(["stage4/use", "stage4/packages", "stage4/root_overlay", "stage4/fsscript", \
+ "stage4/rcadd","stage4/rcdel"])
generic_stage_target.__init__(self,spec,addlargs)
def set_use(self):
- self.settings["use"]=self.settings["stage4/use"]
+ if self.settings.has_key("use"):
+ self.settings["use"]=self.settings["stage4/use"]
+ else:
+ pass
+ def set_cleanables(self):
+ self.settings["cleanables"]=["/var/tmp/*","/tmp/*"]
def set_action_sequence(self):
self.settings["action_sequence"]=["dir_setup","unpack","unpack_snapshot",\
"config_profile_link","setup_confdir","portage_overlay",\
- "bind","chroot_setup","setup_environment",\
- "root_overlay","build_packages","preclean","clear_autoresume",\
- "unmerge","unbind","remove","empty","clean","capture"]
-
+ "bind","chroot_setup","setup_environment","build_packages",\
+ "build_kernel","root_overlay","preclean","rcupdate","fsscript",\
+ "clear_autoresume","unmerge","unbind","remove","empty",\
+ "clean","capture"]
def register(foo):
foo.update({"stage4":stage4_target})
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/livecd-stage1-controller.sh,v 1.3 2005/04/06 23:23:57 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/livecd-stage1-controller.sh,v 1.4 2005/04/11 20:05:40 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
# now, finalize and tweak the livecd fs (inside of the chroot)
exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh
-
- # if the user has their own fs update script, execute it
- if [ -n "${clst_livecd_fsscript}" ]
- then
- exec_in_chroot ${clst_livecd_fsscript}
- fi
+ ;;
+
+ rc-update)
+ exec_in_chroot ${clst_sharedir}/targets/support/rc-update.sh
+ ;;
+
+ fsscript)
+ exec_in_chroot ${clst_fsscript}
;;
build_packages)
clean)
find ${clst_chroot_path}/usr/lib -iname "*.pyc" -exec rm -f {} \;
- ;;
+ ;;
esac
exit 0
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/livecd-stage2-controller.sh,v 1.3 2005/04/06 23:23:57 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage2/livecd-stage2-controller.sh,v 1.4 2005/04/11 20:05:40 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
. ${clst_sharedir}/targets/support/filesystem-functions.sh
# now, finalize and tweak the livecd fs (inside of the chroot)
exec_in_chroot ${clst_sharedir}/targets/support/livecdfs-update.sh
+ ;;
- # if the user has their own fs update script, execute it
- if [ -n "${clst_livecd_fsscript}" ]
- then
- exec_in_chroot ${clst_livecd_fsscript}
- fi
+ rc-update)
+ exec_in_chroot ${clst_sharedir}/targets/support/rc-update.sh
+ ;;
+ fsscript)
+ exec_in_chroot ${clst_fsscript}
;;
clean)
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage4/stage4-controller.sh,v 1.1 2005/04/04 17:48:33 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage4/stage4-controller.sh,v 1.2 2005/04/11 20:05:40 rocket Exp $
. ${clst_sharedir}/targets/support/functions.sh
enter)
${clst_CHROOT} ${clst_chroot_path}
;;
-
+ kernel)
+ shift
+ export clst_kname="$1"
+ exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
+ exec_in_chroot ${clst_sharedir}/targets/support/kmerge.sh
+ exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
+ extract_modules ${clst_chroot_path} ${clst_kname}
+ extract_kernel ${clst_chroot_path}/boot ${clst_kname}
+ ;;
build_packages)
shift
export clst_packages="$*"
preclean)
exec_in_chroot ${clst_sharedir}/targets/${clst_target}/${clst_target}-preclean-chroot.sh ${clst_root_path}
;;
+
+ rc-update)
+ exec_in_chroot ${clst_sharedir}/targets/support/rc-update.sh
+ ;;
+
+ fsscript)
+ exec_in_chroot ${clst_fsscript}
+ ;;
+
clean)
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/targets/stage4/Attic/unmerge.sh,v 1.1 2005/04/11 20:05:40 rocket Exp $
+
+${clst_CHROOT} ${clst_chroot_path} /bin/bash << EOF
+ EMERGE_WARNING_DELAY=0 emerge -C $*
+EOF
+
+exit 0
}
extract_kernels() {
+ # extract multiple kernels
#$1 = Destination
#${clst_target_path}/kernel is often a good choice for ${1}
extract_modules() {
#$1 = Destination
#$2 = kname
- kbinary="${clst_chroot_path}/usr/portage/packages/gk_binaries/${2}-modules-${clst_version_stamp}.tar.bz2"
+ kmodules="${clst_chroot_path}/usr/portage/packages/gk_binaries/${2}-modules-${clst_version_stamp}.tar.bz2"
+ [ ! -e "${kmodules}" ] && die "Can't find kernel modules tarball at ${kmodules}"
+ mkdir -p ${1}/
+ tar xjf ${kmodules} -C ${1} lib
+}
+extract_kernel() {
+ #$1 = Destination
+ #$2 = kname
+
+ kbinary="${clst_chroot_path}/usr/portage/packages/gk_binaries/${2}-kernel-initrd-${clst_version_stamp}.tar.bz2"
[ ! -e "${kbinary}" ] && die "Can't find kernel tarball at ${kbinary}"
mkdir -p ${1}/
- tar xjf ${kbinary} -C ${1}/ lib
+ tar xjf ${kbinary} -C ${1}/
+ # change config name from "config-*" to "gentoo", for example
+ #mv ${1}/config-* ${1}/${2}-config
+ rm ${1}/config-*
+
+ # change kernel name from "kernel" to "gentoo", for example
+ mv ${1}/kernel-* ${1}/${2}
+
+ # change initrd name from "initrd" to "gentoo.igz", for example
+ if [ -e ${1}/initrd-* ]
+ then
+ mv ${1}/initrd-* ${1}/${2}.igz
+ fi
+
+ # change initramfs name from "initramfs" to "gentoo.igz", for example
+ if [ -e ${1}/initramfs-* ]
+ then
+ mv ${1}/initramfs-* ${1}/${2}.igz
+ fi
}
check_dev_manager(){
setup_gk_args() {
# default genkernel args
- GK_ARGS="${clst_livecd_gk_mainargs} \
+ GK_ARGS="${clst_gk_mainargs} \
${clst_kernel_gk_kernargs} \
--no-mountboot \
--no-install \
--minkernpackage=/usr/portage/packages/gk_binaries/${clst_kname}-kernel-initrd-${clst_version_stamp}.tar.bz2 \
--kerncache=/usr/portage/packages/gk_binaries/${clst_kname}-kerncache-${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}" ]
+ if [ "${clst_splash_type}" == "bootsplash" -a -n "${clst_splash_theme}" ]
then
- GK_ARGS="${GK_ARGS} --bootsplash=${clst_livecd_splash_theme}"
+ GK_ARGS="${GK_ARGS} --bootsplash=${clst_splash_theme}"
fi
- if [ "${clst_livecd_splash_type}" == "gensplash" -a -n "${clst_livecd_splash_theme}" ]
+ if [ "${clst_splash_type}" == "gensplash" -a -n "${clst_splash_theme}" ]
then
- GK_ARGS="${GK_ARGS} --gensplash=${clst_livecd_splash_theme}"
+ GK_ARGS="${GK_ARGS} --gensplash=${clst_splash_theme}"
fi
if [ -n "${clst_CCACHE}" ]
GK_ARGS="${GK_ARGS} --kernel-cc=/usr/lib/ccache/bin/gcc --utils-cc=/usr/lib/ccache/bin/gcc"
fi
- if [ "${clst_livecd_devmanager}" == "udev" ]
+ if [ "${clst_devmanager}" == "devfs" ]
then
- GK_ARGS="${GK_ARGS} --udev"
- else
GK_ARGS="${GK_ARGS} --no-udev"
fi
}
genkernel --postconf="PKGDIR=${PKGDIR} emerge -kb ${clst_kernel_postconf}" \
${GK_ARGS} || exit 1
else
- echo "genkernel"
genkernel ${GK_ARGS} || exit 1
fi
else
genkernel --postconf="emerge ${clst_kernel_postconf}" \
${GK_ARGS} || exit 1
else
- echo "genkernel"
genkernel ${GK_ARGS} || exit 1
fi
fi
#echo "EXTRAVERSION match"
EXTRAVERSION_MATCH=1
fi
-
fi
fi
then
if [ -n "${clst_KERNCACHE}" ]
then
- echo "CONFIG match"
+ #echo "CONFIG match"
CONFIG_MATCH=1
fi
USE="${USE} symlink build" emerge "${clst_ksource}" || exit 1
fi
-#if catalyst has set NULL_VALUE, extraversion wasn't specified so we skip this part
+#if catalyst has set to a empty string, extraversion wasn't specified so we skip this part
if [ "${EXTRAVERSION_MATCH}" != "1" ]
then
- if [ "${clst_kextraversion}" != "NULL_VALUE" ]
+ if [ "${clst_kextraversion}" != "" ]
then
echo "Setting extraversion to ${clst_kextraversion}"
sed -i -e "s:EXTRAVERSION \(=.*\):EXTRAVERSION \1-${clst_kextraversion}:" /usr/src/linux/Makefile
+ echo ${clst_kextraversion} > /usr/portage/packages/gk_binaries/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
+ else
+ touch /usr/portage/packages/gk_binaries/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
fi
- echo ${clst_kextraversion} > /usr/portage/packages/gk_binaries/${clst_kname}/${clst_kname}-${clst_version_stamp}.EXTRAVERSION
fi
#!/bin/bash
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/livecdfs-update.sh,v 1.6 2005/04/08 22:39:45 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/support/livecdfs-update.sh,v 1.7 2005/04/11 20:05:40 rocket Exp $
/usr/sbin/env-update
source /etc/profile
# turn off udev tarball
sed -i 's:RC_DEVICE_TARBALL="yes":RC_DEVICE_TARBALL="no":' /etc/conf.d/rc
-
-# 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
-[ -e /etc/init.d/hdparm ] && rc-update add hdparm default
-
-# Do some livecd_type specific rc-update changes
-case ${clst_livecd_type} in
- gentoo-gamecd )
- # we add spind to default here since we don't want the CD to spin down
- rc-update add spind default
- rc-update add x-setup default
- ;;
- *)
- ;;
-esac
-
-# 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
-
# Comment out current getty settings
sed -i -e '/^c[0-9]/ s/^/#/' /etc/inittab
--- /dev/null
+#!/bin/bash
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+if [ "${clst_spec_prefix}" == "livecd" ]
+then
+ # 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
+ [ -e /etc/init.d/hdparm ] && rc-update add hdparm default
+
+ # Do some livecd_type specific rc-update changes
+ case ${clst_livecd_type} in
+ gentoo-gamecd )
+ # we add spind to default here since we don't want the CD to spin down
+ rc-update add spind default
+ rc-update add x-setup default
+ ;;
+ *)
+ ;;
+ esac
+fi
+
+# perform any rcadd then any rcdel
+if [ -n "${clst_rcadd}" ] || [ -n "${clst_rcdel}" ]
+then
+ if [ -n "${clst_rcadd}" ]
+ then
+ for x in ${clst_rcadd}
+ do
+ rc-update add "${x%%:*}" "${x##*:}"
+ done
+ fi
+
+ if [ -n "${clst_rcdel}" ]
+ then
+ for x in ${clst_rcdel}
+ do
+ rc-update del "${x%%:*}" "${x##*:}"
+ done
+ fi
+fi
+