def __init__(self,device,mountpoint,filesystem): MountPoint.__init__(self,device,mountpoint,filesystem) if self.device[:len(DM_PREFIX)] == DM_PREFIX: for name in os.listdir(MAPPER_PATH): dev = os.path.realpath(os.path.join(MAPPER_PATH,name)) if name == os.path.basename(self.device): self.device = dev break self.uuid = None for uuid in os.listdir(UUID_PATH): dev = os.path.realpath(os.path.join(UUID_PATH,uuid)) if dev == self.device: self.uuid = uuid break self.label = None if os.path.isdir(LABEL_PATH): for label in os.listdir(LABEL_PATH): dev = os.path.realpath(os.path.join(LABEL_PATH,label)) if dev == self.device: self.label = label break
def __init__(self, device, mountpoint, filesystem): MountPoint.__init__(self, device, mountpoint, filesystem) if self.device[:len(DM_PREFIX)] == DM_PREFIX: for name in os.listdir(MAPPER_PATH): dev = os.path.realpath(os.path.join(MAPPER_PATH, name)) if name == os.path.basename(self.device): self.device = dev break self.uuid = None for uuid in os.listdir(UUID_PATH): dev = os.path.realpath(os.path.join(UUID_PATH, uuid)) if dev == self.device: self.uuid = uuid break self.label = None if os.path.isdir(LABEL_PATH): for label in os.listdir(LABEL_PATH): dev = os.path.realpath(os.path.join(LABEL_PATH, label)) if dev == self.device: self.label = label break
def __init__(self, device, mountpoint, filesystem): MountPoint.__init__(self, device, mountpoint, filesystem)