--- storage/formats/__init__.py | 3 +++ storage/formats/fs.py | 17 ++++++++++++++++- storage/formats/lvmpv.py | 3 +++ storage/formats/mdraid.py | 3 +++ storage/formats/prepboot.py | 3 +++ storage/formats/swap.py | 3 +++ 6 files changed, 31 insertions(+), 1 deletions(-) diff --git a/storage/formats/__init__.py b/storage/formats/__init__.py index ffaa90f..c097e14 100644 --- a/storage/formats/__init__.py +++ b/storage/formats/__init__.py @@ -364,6 +364,9 @@ class DeviceFormat(object): """ Minimum size (in MB) for this format type. """ return self._minSize + def writeKS(self, f): + return + collect_device_format_classes() diff --git a/storage/formats/fs.py b/storage/formats/fs.py index 93fa948..d8207e1 100644 --- a/storage/formats/fs.py +++ b/storage/formats/fs.py @@ -721,7 +721,7 @@ class FS(DeviceFormat): def setup(self, *args, **kwargs): """ Mount the filesystem. - THe filesystem will be mounted at the directory indicated by + The filesystem will be mounted at the directory indicated by self.mountpoint. """ return self.mount(**kwargs) @@ -736,6 +736,9 @@ class FS(DeviceFormat): return False return self._mountpoint is not None + def writeKS(self, f): + f.write("%s --fstype=%s" % (self.mountpoint, self.type)) + class Ext2FS(FS): """ ext2 filesystem. """ @@ -1005,6 +1008,9 @@ class AppleBootstrapFS(HFS): return (isinstance(platform.getPlatform(None), platform.NewWorldPPC) and self.utilsAvailable) + def writeKS(self, f): + f.write("appleboot --fstype=%s" % self.type) + register_device_format(AppleBootstrapFS) @@ -1120,6 +1126,9 @@ class Iso9660FS(FS): _migratable = False _defaultMountOptions = ["ro"] + def writeKS(self, f): + return + register_device_format(Iso9660FS) @@ -1138,6 +1147,9 @@ class NoDevFS(FS): def _getExistingSize(self): pass + def writeKS(self, f): + return + register_device_format(NoDevFS) @@ -1178,6 +1190,9 @@ class BindFS(FS): def _getExistingSize(self): pass + def writeKS(self, f): + return + register_device_format(BindFS) diff --git a/storage/formats/lvmpv.py b/storage/formats/lvmpv.py index a111635..faec109 100644 --- a/storage/formats/lvmpv.py +++ b/storage/formats/lvmpv.py @@ -119,5 +119,8 @@ class LVMPhysicalVolume(DeviceFormat): return (self.exists and self.vgName and os.path.isdir("/dev/mapper/%s" % self.vgName)) + def writeKS(self, f): + f.write("pv.%s" % self.uuid) + register_device_format(LVMPhysicalVolume) diff --git a/storage/formats/mdraid.py b/storage/formats/mdraid.py index ec1a617..b29d2f5 100644 --- a/storage/formats/mdraid.py +++ b/storage/formats/mdraid.py @@ -92,6 +92,9 @@ class MDRaidMember(DeviceFormat): # XXX hack -- we don't have a nice way to see if the array is active return False + def writeKS(self, f): + f.write("raid.%s" % self.mdUuid) + register_device_format(MDRaidMember) diff --git a/storage/formats/prepboot.py b/storage/formats/prepboot.py index 2d851ed..2191b81 100644 --- a/storage/formats/prepboot.py +++ b/storage/formats/prepboot.py @@ -56,6 +56,9 @@ class PPCPRePBoot(DeviceFormat): import platform return isinstance(platform.getPlatform(None), platform.IPSeriesPPC) + def writeKS(self, f): + f.write("prepboot --fstype=%s" % self.type) + register_device_format(PPCPRePBoot) diff --git a/storage/formats/swap.py b/storage/formats/swap.py index 31774dc..392ed11 100644 --- a/storage/formats/swap.py +++ b/storage/formats/swap.py @@ -142,6 +142,9 @@ class SwapSpace(DeviceFormat): swap.mkswap(self.device, label=self.label) self.exists = True + def writeKS(self, f): + f.write("swap") + register_device_format(SwapSpace) -- 1.6.1.3 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list