def doUmount(self, device, mountpoint):
devpath = "/dev/"+device
- if len(deviceinfo.checkMountDev(devpath)) == 0:
+ mountpoints = deviceinfo.checkMountDev(devpath)
+ if len(mountpoints) == 0:
return
- cmd = "umount %s"%devpath
- print "[DeviceManager] cmd : %s"%cmd
- os.system(cmd)
+ for mp in mountpoints:
+ cmd = "umount %s"%devpath
+ print "[DeviceManager] cmd : %s"%cmd
+ os.system(cmd)
def addHotPlugDevice(self, partition):
device = partition.device
sysctlList = {}
for line in sysctlLines:
line = line.strip()
- (key,value) = line.split("=")
- key=key.strip()
- value=value.strip()
+ try:
+ (key,value) = line.split("=")
+ key=key.strip()
+ value=value.strip()
+ except:
+ continue
sysctlList[key] = value
sysctlList["net.ipv4.ip_forward"] = str(setValue)
fp = file(sysctlPath, "w")