From: John P. Davis Date: Thu, 20 May 2004 21:16:56 +0000 (+0000) Subject: module blacklisting added X-Git-Tag: CATALYST_2_0_6_916~994 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a5a74a40879ebacb12a9e9fdafad0e488c625f40;p=catalyst.git module blacklisting added git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@379 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index 9f8e7cba..a982d400 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for gentoo/src/catalyst # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.51 2004/05/19 12:40:03 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.52 2004/05/20 21:16:56 zhen Exp $ + + 20 May 2004; John Davis modules/livecd_stage2_target.py: + added support for blacklisting modules via hotplug in livecd-stage2. spec key + is livecd/modblacklist 19 May 2004; John Davis livecd/runscript/default-runscript.sh, modules/livecd_stage2_target.py, diff --git a/modules/livecd_stage2_target.py b/modules/livecd_stage2_target.py index 43b34e2c..3076af33 100644 --- a/modules/livecd_stage2_target.py +++ b/modules/livecd_stage2_target.py @@ -1,6 +1,6 @@ # Distributed under the GNU General Public License version 2 # Copyright 2003-2004 Gentoo Technologies, Inc. -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.4 2004/05/19 12:40:03 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/livecd_stage2_target.py,v 1.5 2004/05/20 21:16:56 zhen Exp $ """ Builder class for a LiveCD stage2 build. @@ -29,7 +29,7 @@ class livecd_stage2_target(generic_stage_target): self.valid_values.append("boot/kernel/"+x+"/use") self.valid_values.append("boot/kernel/"+x+"/gk_kernargs") 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","livecd/motd","livecd/overlay"]) + self.valid_values.extend(["livecd/cdtar","livecd/empty","livecd/rm","livecd/unmerge","livecd/iso","livecd/gk_mainargs","livecd/type","livecd/motd","livecd/overlay","livecd/modblacklist"]) generic_stage_target.__init__(self,spec,addlargs) file_locate(self.settings, ["livecd/cdtar","livecd/archscript","livecd/runscript"]) @@ -173,6 +173,20 @@ class livecd_stage2_target(generic_stage_target): self.unbind() raise CatalystError,"runscript aborting due to error." + # what modules do we want to blacklist? + if self.settings.has_key("livecd/modblacklist"): + mylist=self.settings["livecd/modblacklist"] + if type(mylist)==types.StringType: + mylist=[mylist] + try: + myf=open(self.settings["chroot_path"]+"/etc/hotplug/blacklist","a") + except: + self.unbind() + raise CatalystError,"Couldn't open "+self.settings["chroot_path"]+"/etc/hotplug/blacklist." + myf.write("\n#Added by Catalyst:") + for x in mylist: + myf.write("\n"+x+"\n") + def register(foo): foo.update({"livecd-stage2":livecd_stage2_target}) return foo