# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/examples/Attic/x86-livecd-stage3-runscript.sh,v 1.2 2004/01/09 01:12:25 drobbins Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/examples/Attic/x86-livecd-stage3-runscript.sh,v 1.3 2004/01/09 22:35:05 drobbins Exp $
die() {
echo "$1"
cdtar=$clst_livecd_stage3_cdtar
[ "$cdtar" = "" ] && die "No livecd-stage3/cdtar specified (required)"
- tar xpvf $cdtar -C $clst_cdroot_path || die "Couldn't extract cdtar $cdtar"
+ tar xjpvf $cdtar -C $clst_cdroot_path || die "Couldn't extract cdtar $cdtar"
if [ "$clst_boot_kernel" = "" ]
then
echo "No boot/kernel setting defined, exiting."
except CatalystError:
self.unbind()
raise CatalystError,"Stage build aborting due to error."
- pass
def run(self):
self.dir_setup()
self.clean()
if self.settings["target"] in ["stage1","stage2","stage3","livecd-stage1","livecd-stage2"]:
self.capture()
+ if self.settings["target"] in ["livecd-stage3"]:
+ self.cdroot_setup()
class snapshot_target(generic_target):
def __init__(self,myspec,addlargs):
self.valid_values.append("livecd-stage3/cdtar","livecd-stage3/clean")
generic_stage_target.__init__(self,spec,addlargs)
+ def run_local(self):
+ try:
+ cmd(self.settings["livecd-stage3/runscript"]+" run","runscript failed")
+ except CatalystError:
+ self.unbind()
+ raise CatalystError,"Stage build aborting due to error."
+
+ def preclean(self):
+ try:
+ cmd(self.settings["livecd-stage3/runscript"]+" preclean","preclean runscript failed.")
+ except:
+ self.unbind()
+ raise
+
+ def cdroot_setup(self):
+ cmd(self.settings["livecd-stage3/runscript"]+" cdroot_setup","preclean runscript failed.")
+
def register(foo):
foo.update({"stage1":stage1_target,"stage2":stage2_target,"stage3":stage3_target,
"grp":grp_target,"livecd-stage1":livecd_stage1_target,