'program' arg belongs with m.output, not m.input. Putting a try: ... except: pass...
authorMarc Fiuczynski <mef@cs.princeton.edu>
Tue, 24 Feb 2009 21:51:23 +0000 (21:51 +0000)
committerMarc Fiuczynski <mef@cs.princeton.edu>
Tue, 24 Feb 2009 21:51:23 +0000 (21:51 +0000)
plnet.py

index 557103a..2c06d06 100755 (executable)
--- a/plnet.py
+++ b/plnet.py
@@ -161,7 +161,7 @@ def InitInterfaces(logger, plc, data, root="", files_only=False, program="NodeMa
                 
     m = modprobe.Modprobe()
     try:
-        m.input("%s/etc/modprobe.conf" % root, program)
+        m.input("%s/etc/modprobe.conf" % root)
     except:
         pass
     for (dev, inter) in interfaces.iteritems():
@@ -174,7 +174,7 @@ def InitInterfaces(logger, plc, data, root="", files_only=False, program="NodeMa
             options=" ".join(driver[1:])
             if options <> '':
                 m.optionsset(dev,options)
-    m.output("%s/etc/modprobe.conf" % root)
+    m.output("%s/etc/modprobe.conf" % root, program)
 
     # clean up after any ifcfg-$dev script that's no longer listed as
     # part of the NodeNetworks associated with this node