|
|
|
@ -176,21 +176,15 @@ class FileSystemManager(object):
|
|
|
|
|
else:
|
|
|
|
|
return ""
|
|
|
|
|
|
|
|
|
|
defaultFS = {
|
|
|
|
|
'hdd': ("ext4"
|
|
|
|
|
if path.exists(supportFS['ext4']['format']) else
|
|
|
|
|
"btrfs"
|
|
|
|
|
if path.exists(supportFS['btrfs']['format']) else
|
|
|
|
|
"reiserfs"
|
|
|
|
|
if path.exists(supportFS['reiserfs']['format']) else
|
|
|
|
|
"ext3"),
|
|
|
|
|
'flash': "vfat",
|
|
|
|
|
'usb-hdd': ("ext4"
|
|
|
|
|
if path.exists(supportFS['ext4']['format']) else
|
|
|
|
|
"reiserfs"
|
|
|
|
|
if path.exists(supportFS['reiserfs']['format']) else
|
|
|
|
|
"ext3")
|
|
|
|
|
}
|
|
|
|
|
@classmethod
|
|
|
|
|
def get_default_fs(cls, dv, installtype):
|
|
|
|
|
if installtype == 'flash':
|
|
|
|
|
return 'vfat'
|
|
|
|
|
filesystems = dv.Get('install.cl_install_fs')
|
|
|
|
|
for fs in filesystems:
|
|
|
|
|
if fs in cls.supportFS and path.exists(cls.supportFS[fs]['format']):
|
|
|
|
|
return fs
|
|
|
|
|
return 'ext3'
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def getDefaultOpt(cls, fs, ssd=False, compress=None):
|
|
|
|
|