summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2009-12-21 19:10:25 -0600
committerDavid Lehman <dlehman@redhat.com>2009-12-22 15:02:36 -0600
commit4b45e3d40784233c1a9c2cd651ea0dff2cf35694 (patch)
tree6ac27a695042c9bd9c80fadf03629b96f686a8cc
parentf6f23c29ac4a6a2035bc8a67aafecd41c5414a95 (diff)
downloadanaconda-4b45e3d40784233c1a9c2cd651ea0dff2cf35694.tar.gz
anaconda-4b45e3d40784233c1a9c2cd651ea0dff2cf35694.tar.xz
anaconda-4b45e3d40784233c1a9c2cd651ea0dff2cf35694.zip
Put fsprofile support back in.
-rw-r--r--kickstart.py15
-rw-r--r--storage/formats/fs.py6
2 files changed, 11 insertions, 10 deletions
diff --git a/kickstart.py b/kickstart.py
index 3fbb3d57e..bd4d05c47 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -484,9 +484,8 @@ class LogVolData(commands.logvol.F12_LogVolData):
maxsize=self.maxSizeMB,
percent=self.percent)
- # FIXME: no way to specify an fsprofile right now
- # if lvd.fsprofile:
- # request.format.fsprofile = lvd.fsprofile
+ if self.fsprofile and hasattr(request.format, "fsprofile"):
+ request.format.fsprofile = self.fsprofile
storage.createDevice(request)
@@ -734,9 +733,8 @@ class PartitionData(commands.partition.F12_PartData):
request = storage.newPartition(**kwargs)
- # FIXME: no way to specify an fsprofile right now
- # if self.fsprofile:
- # request.format.fsprofile = self.fsprofile
+ if self.fsprofile and hasattr(request.format, "fsprofile"):
+ request.format.fsprofile = self.fsprofile
storage.createDevice(request)
@@ -874,9 +872,8 @@ class RaidData(commands.raid.F12_RaidData):
except ValueError, e:
raise KickstartValueError, formatErrorMsg(self.lineno, msg=str(e))
- # FIXME: no way to specify an fsprofile right now
- # if pd.fsprofile:
- # request.format.fsprofile = pd.fsprofile
+ if self.fsprofile and hasattr(request.format, "fsprofile"):
+ request.format.fsprofile = self.fsprofile
storage.createDevice(request)
diff --git a/storage/formats/fs.py b/storage/formats/fs.py
index 239386dc3..09e764d5f 100644
--- a/storage/formats/fs.py
+++ b/storage/formats/fs.py
@@ -124,6 +124,7 @@ class FS(DeviceFormat):
_defaultInfoOptions = []
_migrationTarget = None
_existingSizeFields = []
+ _fsProfileSpecifier = None # mkfs option specifying fsprofile
def __init__(self, *args, **kwargs):
""" Create a FS instance.
@@ -143,10 +144,10 @@ class FS(DeviceFormat):
raise TypeError("FS is an abstract class.")
DeviceFormat.__init__(self, *args, **kwargs)
- # TODO: fsprofiles and other ways to add format args
self.mountpoint = kwargs.get("mountpoint")
self.mountopts = kwargs.get("mountopts")
self.label = kwargs.get("label")
+ self.fsprofile = kwargs.get("fsprofile")
# filesystem size does not necessarily equal device size
self._size = kwargs.get("size", 0)
@@ -297,6 +298,8 @@ class FS(DeviceFormat):
if options and isinstance(options, list):
argv.extend(options)
argv.extend(self.defaultFormatOptions)
+ if self._fsProfileSpecifier and self.fsprofile:
+ argv.extend([self._fsProfileSpecifier, self.fsprofile])
argv.append(self.device)
return argv
@@ -872,6 +875,7 @@ class Ext2FS(FS):
_infofs = "dumpe2fs"
_defaultInfoOptions = ["-h"]
_existingSizeFields = ["Block count:", "Block size:"]
+ _fsProfileSpecifier = "-T"
partedSystem = fileSystemType["ext2"]
def _fsckFailed(self, rc):