Fix fs options for fstab.

master3.3
Mike Hiretsky 12 years ago
parent a9e0e7b806
commit ad398eef03

@ -27,7 +27,7 @@ setLocalTranslate('cl_install',sys.modules[__name__])
class FileSystemManager:
"""Convert dict install option"""
defaultOpt = 'noatime'
defaultOpt = ['noatime']
defaultBindOpts = ['bind']
supportFS = {
'ext2': {'defaultopt': defaultOpt,
@ -135,7 +135,7 @@ class FileSystemManager:
@classmethod
def getDefaultOpt(cls,fs):
return cls.supportFS.get(fs,{'defaultopt':''})['defaultopt']
return ",".join(cls.supportFS.get(fs,{'defaultopt':[]})['defaultopt'])
@classmethod
def checkFSForType(cls,fs,roottype):

@ -1059,9 +1059,11 @@ class VariableOsInstallDiskOptions(ReadonlyVariable):
def get(self):
"""TODO: get real options"""
diskOpts = dict(zip(self.Get('os_disk_dev'),
self.Get('os_disk_options')))
return map(lambda x:diskOpts.get(x,''),
self.Get('os_install_disk_dev'))
self.Get('os_disk_options')))
return map(lambda x:diskOpts.get(x[0],x[1]),
map(lambda x:(x[0],FileSystemManager.getDefaultOpt(x[1])),
self.ZipVars('os_install_disk_dev',
'os_install_disk_format')))
class VariableOsInstallDiskFormat(ReadonlyVariable):
"""

Loading…
Cancel
Save