Restore btrfs for non-livecd root

master3.3
Mike Hiretsky 12 years ago
parent 47e8b21e5a
commit 2e2b00940f

@ -59,6 +59,7 @@ class FileSystemManager:
'msdos': '83',
'type':['hdd','usb-hdd']},
'btrfs': {'defaultopt': defaultOpt,
'format':'/sbin/mkfs.btrfs',
'formatparam': '{labelparam} {device}',
'gpt': '0700',
'label': '-L {labelname}',

@ -106,11 +106,16 @@ class VariableOsFormatUse(ReadonlyVariable):
'type': "bool",
'value': "off"}
def checkFunc(self,fs):
if fs == "btrfs" and self.Get('os_root_type') == 'livecd':
return "no"
if "format" in FileSystemManager.supportFS[fs] and \
path.exists(FileSystemManager.supportFS[fs]["format"]):
return "yes"
return "no"
def get(self):
return map(lambda x:"yes"
if "format" in FileSystemManager.supportFS[x] and \
path.exists(FileSystemManager.supportFS[x]["format"])
else "no", self.Get('os_format_type'))
return map(self.checkFunc, self.Get('os_format_type'))
class VariableClMigrateRootPwd(UserHelper,Variable):
"""

Loading…
Cancel
Save