Fix for cciss.
[nodemanager.git] / plugins / rawdisk.py
index b220a46..727351e 100644 (file)
@@ -39,14 +39,13 @@ def get_unused_devices():
             break
         buf = buf.strip()
         fields = re.split(pat, buf)
-        print fields
         dev = fields[-1]
         if not dev.startswith("dm-") and dev.endswith("1") and dev not in in_vg:
             devices.append("/dev/%s" % dev)
     partitions.close()
     return devices
 
-def GetSlivers(plc, data, conf):
+def GetSlivers(data, config=None, plc=None):
     if 'slivers' not in data: 
         logger.log("sliverauth: getslivers data lack's sliver information. IGNORING!")
         return
@@ -69,4 +68,8 @@ def GetSlivers(plc, data, conf):
                             os.unlink(path)
                     except:
                         pass
+                    try:
+                        os.makedirs(os.path.dirname(path), 0755)
+                    except:
+                        pass
                     os.mknod(path, st.st_mode, st.st_rdev)