[anaconda][PATCH 5/5] Add tmpfs support (#918621)
Martin Kolman
mkolman at redhat.com
Thu Nov 7 17:52:15 UTC 2013
Add logic needed by tmpfs,
bump PyKickstart command to the
F20 version needed by tmpfs
and bump needed pykickstart version.
Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
pyanaconda/kickstart.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 7161c48..d615208 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -882,7 +882,7 @@ class DmRaid(commands.dmraid.FC6_DmRaid):
def parse(self, args):
raise NotImplementedError("The dmraid kickstart command is not currently supported")
-class Partition(commands.partition.F18_Partition):
+class Partition(commands.partition.F20_Partition):
def execute(self, storage, ksdata, instClass):
for p in self.partitions:
p.execute(storage, ksdata, instClass)
@@ -1011,7 +1011,8 @@ class PartitionData(commands.partition.F18_PartData):
mountpoint=self.mountpoint,
label=self.label,
fsprofile=self.fsprofile,
- mountopts=self.fsopts)
+ mountopts=self.fsopts,
+ size=self.size)
if not kwargs["format"].type:
raise KickstartValueError, formatErrorMsg(self.lineno, msg="The \"%s\" filesystem type is not supported." % type)
@@ -1066,6 +1067,11 @@ class PartitionData(commands.partition.F18_PartData):
msg="Invalid target size (%d) for device %s" % (self.size, device.name)))
devicetree.registerAction(ActionCreateFormat(device, kwargs["format"]))
+ # tmpfs mounts are not disks and don't occupy a disk partition,
+ # so handle them here
+ elif self.fstype == "tmpfs":
+ request = storage.newTmpFS(**kwargs)
+ storage.createDevice(request)
else:
# If a previous device has claimed this mount point, delete the
# old one.
--
1.8.3.1
More information about the anaconda-patches
mailing list