Fix uuid fstab

master3.3
Mike Hiretsky 11 years ago
parent b28564d84b
commit 2d89ce2e8e

@ -338,7 +338,7 @@ class VariableOsDiskMount(ReadonlyVariable,DeviceHelper):
def get(self):
disk_hash = self.Get('os_disk_dev')
fstab = FStab('/etc/fstab')
fstab = FStab('/etc/fstab',devs=disk_hash)
rootdev = self.Get('os_root_dev')
return map(lambda x: '/' if x == rootdev else fstab.getBy(eq=x) or "",
self.Get('os_disk_dev'))
@ -364,7 +364,7 @@ class VariableOsDiskFormat(ReadonlyVariable):
def get(self):
"""Get current disk filesystem"""
fstab = FStab('/etc/fstab')
fstab = FStab('/etc/fstab',devs=self.Get('os_disk_dev'))
def getFormat(device):
prop = getUdevDeviceInfo(name=device)
return prop.get('FSTAB_TYPE') or \
@ -543,7 +543,7 @@ class VariableOsDiskOptions(ReadonlyVariable):
type = "list"
def get(self):
fstab = FStab('/etc/fstab')
fstab = FStab('/etc/fstab',devs=self.Get('os_disk_dev'))
def getFormat(device):
return fstab.getBy(what=fstab.OPTS,eq=device)
return map(getFormat,
@ -566,7 +566,7 @@ class VariableOsBindPath(ReadonlyVariable):
type = "list"
def get(self):
fstab = FStab('/etc/fstab')
fstab = FStab('/etc/fstab',devs=self.Get('os_disk_dev'))
return fstab.getBy(what=fstab.NAME,where=fstab.OPTS,
_in="bind",allentry=True)
@ -577,7 +577,7 @@ class VariableOsBindMountpoint(ReadonlyVariable):
type = "list"
def get(self):
fstab = FStab('/etc/fstab')
fstab = FStab('/etc/fstab',devs=self.Get('os_disk_dev'))
return fstab.getBy(what=fstab.DIR,where=fstab.OPTS,
_in="bind",allentry=True)

Loading…
Cancel
Save