Make dhclient persistent, so transient network failures don't make nodes unreachable.
[pyplnet.git] / modprobe.py
index 638ebfa..2ba40d7 100644 (file)
@@ -11,7 +11,7 @@ class Modprobe():
     def __init__(self,filename="/etc/modprobe.conf"):
         self.conffile = {}
         self.origconffile = {}
-        for keyword in ("alias","options","install","remove","blacklist","MODULES"):
+        for keyword in ("alias","options","install","remove","blacklist","MODULES","#"):
             self.conffile[keyword]={}
         self.filename = filename
 
@@ -24,7 +24,7 @@ class Modprobe():
 
             table = self.conffile.get(command,None)
             if table == None:
-                print "WARNING: command %s not recognize. Ignoring!" % command
+                print "WARNING: command %s not recognized. Ignoring!" % command
                 continue
 
             if command == "alias":
@@ -99,6 +99,7 @@ class Modprobe():
             os.chmod(filename,0644)
             return True
         else:
+            os.unlink(tmpnam)
             return False
 
     def probe(self,name):