[rhel7-branch 1/1] Add RAID swaps to /etc/fstab (#1234469)

bcl installerbot-noreply at redhat.com
Tue Jun 30 22:37:19 UTC 2015


From: "Brian C. Lane" <bcl at redhat.com>

swaps needs to be explicitly added to fstab now, it was working for
partitions and logvol but not RAID. This adds RAID support.

Resolves: rhbz#1234469
---
 pyanaconda/kickstart.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 3350ab9..0834030 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -1414,6 +1414,8 @@ def execute(self, storage, ksdata, instClass):
 
             dev.format.mountpoint = self.mountpoint
             dev.format.mountopts = self.fsopts
+            if ty == "swap":
+                storage.addFstabSwap(dev)
             return
 
         # Get a list of all the RAID members.
@@ -1468,6 +1470,8 @@ def execute(self, storage, ksdata, instClass):
 
             removeExistingFormat(device, storage)
             devicetree.registerAction(ActionCreateFormat(device, kwargs["fmt"]))
+            if ty == "swap":
+                storage.addFstabSwap(device)
         else:
             if devicename and devicename in (a.name for a in storage.mdarrays):
                 raise KickstartValueError(formatErrorMsg(self.lineno,
@@ -1488,6 +1492,8 @@ def execute(self, storage, ksdata, instClass):
                 raise KickstartValueError(formatErrorMsg(self.lineno, msg=str(e)))
 
             storage.createDevice(request)
+            if ty == "swap":
+                storage.addFstabSwap(request)
 
         if self.encrypted:
             if self.passphrase and not storage.encryptionPassphrase:


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/5f4fcf1c8f47e741edf9b8f881dd61d0a0a4c703


More information about the anaconda-patches mailing list