module blacklisting added
authorJohn P. Davis <zhen@gentoo.org>
Thu, 20 May 2004 21:16:56 +0000 (21:16 +0000)
committerJohn P. Davis <zhen@gentoo.org>
Thu, 20 May 2004 21:16:56 +0000 (21:16 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@379 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
modules/livecd_stage2_target.py

index 9f8e7cba85ed9a1e3e56f10000f986c4e333bc2a..a982d400481b9033adc6520015d456a63e69dc85 100644 (file)
--- 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 <zhen@gentoo.org> 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 <zhen@gentoo.org>
   livecd/runscript/default-runscript.sh, modules/livecd_stage2_target.py,
index 43b34e2ca7dce7667f7ddfa0b9439411bcf4bfd9..3076af33b4bc34dec0b55b453460a5a989331650 100644 (file)
@@ -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