Added 'vfat' to support file system.

Added excludeFS logic. For '/' wrongfs is 'vfat'.
netsetup
Mike Hiretsky 14 years ago
parent ba9ebe9c82
commit 92ab04b191

@ -281,6 +281,15 @@ class convertDictOpt:
"incompatible":[]}},
"incompatible":[],
"makefs":"/sbin/mkfs.reiserfs"},
"vfat":{"options":["uni_xlate","posix","nonumtail",
"utf8","shortname"],
"pair":{"shortname":{"options":
re.compile("lower|win95|winnt|mixed"),
"incompatible":[]},
"utf8":{"options":
re.compile("0|1|no|false|true|yes"),
"incompatible":["uni_xlate"]}},
"makefs":"/usr/sbin/mkfs.vfat"},
"xfs":{"options":["allocsize", "attr2", "noattr2",
"barrier", "dmapi", "grpid",
"bsdgroups", "nogrpid", "sysvgroups",
@ -538,10 +547,14 @@ class convertDictOpt:
optMountPoint = "/"
dictUpdateProperty["mountPoint"] = optMountPoint
supportedFS = self.getAllSupportFileSystemOpt()
if optMountPoint == "/":
excludeFS = set(["vfat"])
else:
excludeFS = set([])
availableFS = self.getAllAvailableFileSystemOpt()
# if fs not specified and current fs not supported
if not optFileSystem:
if not (format and format in supportedFS):
if not (format and format in set(supportedFS)-excludeFS):
optFileSystem = "default"
else:
dictUpdateProperty["fileSystem"] = format
@ -555,11 +568,20 @@ class convertDictOpt:
if not optFileSystem in availableFS:
raise InstallError(_("File system '%s' is not available")\
%optFileSystem)
dictOptions.update(self.getDefaultOptFileSystem(optFileSystem))
if optFileSystem in excludeFS:
raise InstallError(
_("File system for '%s' should not be '%s'")
%(optMountPoint, optFileSystem))
if not "fileSystem" in dictOptions or optFileSystem == "default":
dictOptions.update(self.getDefaultOptFileSystem(optFileSystem))
if optFileSystem == "noformat":
if not format:
raise InstallError(\
_("Partition %s is not formatted")%dev)
elif format in excludeFS:
raise InstallError(\
_("File system for '%s' should not be '%s'")
%(optMountPoint, format))
if not options:
options = ["noatime"]
dictOptions["fileSystem"] = format

Loading…
Cancel
Save