[f22/master] Fix a bad usage of execWithRedirect (#1197290)
by David Shea
---
pyanaconda/kickstart.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 756eb81..15d38bc 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -566,7 +566,7 @@ class Realm(commands.realm.F19_Realm):
pw_args + self.join_args
rc = -1
try:
- rc = iutil.execWithRedirect("realm", argv)[0]
+ rc = iutil.execWithRedirect("realm", argv)
except OSError:
pass
--
2.1.0
9 years, 2 months
[PATCH] Use the LUKS device for swap in fstab (#1196200)
by Vratislav Podzimek
If we create an encrypted swap we need to use the LUKS device in fstab for such
swap not the partition/LV.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/kickstart.py | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index 756eb81..3656352 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -933,6 +933,7 @@ class LogVolData(commands.logvol.F21_LogVolData):
raise KickstartValueError(formatErrorMsg(self.lineno,
msg=_("The \"%s\" file system type is not supported.") % ty))
+ add_fstab_swap = None
# If we were given a pre-existing LV to create a filesystem on, we need
# to verify it and its VG exists and then schedule a new format action
# to take place there. Also, we only support a subset of all the
@@ -956,7 +957,7 @@ class LogVolData(commands.logvol.F21_LogVolData):
devicetree.registerAction(ActionCreateFormat(device, fmt))
if ty == "swap":
- storage.addFstabSwap(device)
+ add_fstab_swap = device
else:
# If a previous device has claimed this mount point, delete the
# old one.
@@ -1011,7 +1012,7 @@ class LogVolData(commands.logvol.F21_LogVolData):
storage.createDevice(request)
if ty == "swap":
- storage.addFstabSwap(request)
+ add_fstab_swap = request
if self.encrypted:
if self.passphrase and not storage.encryptionPassphrase:
@@ -1038,8 +1039,16 @@ class LogVolData(commands.logvol.F21_LogVolData):
luksdev = LUKSDevice("luks%d" % storage.nextID,
fmt=luksformat,
parents=request)
+ if ty == "swap":
+ # swap is on the LUKS device not on the LUKS' parent device,
+ # override the info here
+ add_fstab_swap = luksdev
+
storage.createDevice(luksdev)
+ if add_fstab_swap:
+ storage.addFstabSwap(add_fstab_swap)
+
class Logging(commands.logging.FC6_Logging):
def execute(self, *args):
if logger.loglevel == DEFAULT_LEVEL:
@@ -1267,6 +1276,7 @@ class PartitionData(commands.partition.F18_PartData):
kwargs["primary"] = self.primOnly
+ add_fstab_swap = None
# If we were given a pre-existing partition to create a filesystem on,
# we need to verify it exists and then schedule a new format action to
# take place there. Also, we only support a subset of all the options
@@ -1289,7 +1299,7 @@ class PartitionData(commands.partition.F18_PartData):
devicetree.registerAction(ActionCreateFormat(device, kwargs["fmt"]))
if ty == "swap":
- storage.addFstabSwap(device)
+ add_fstab_swap = device
# tmpfs mounts are not disks and don't occupy a disk partition,
# so handle them here
elif self.fstype == "tmpfs":
@@ -1315,7 +1325,7 @@ class PartitionData(commands.partition.F18_PartData):
storage.createDevice(request)
if ty == "swap":
- storage.addFstabSwap(request)
+ add_fstab_swap = request
if self.encrypted:
if self.passphrase and not storage.encryptionPassphrase:
@@ -1342,8 +1352,17 @@ class PartitionData(commands.partition.F18_PartData):
luksdev = LUKSDevice("luks%d" % storage.nextID,
fmt=luksformat,
parents=request)
+
+ if ty == "swap":
+ # swap is on the LUKS device not on the LUKS' parent device,
+ # override the info here
+ add_fstab_swap = luksdev
+
storage.createDevice(luksdev)
+ if add_fstab_swap:
+ storage.addFstabSwap(add_fstab_swap)
+
class Raid(commands.raid.F20_Raid):
def execute(self, storage, ksdata, instClass):
for r in self.raidList:
--
2.1.0
9 years, 2 months
Please take a look at https://github.com/mulkieran/blivet (tasks branch)
by Anne Mulhern
The patches from Feb 27 are the relevant ones.
The first six are cleanup.
The remaining, until commit cf724750c simply put identified tasks into separate classes
with appropriate interfaces and then use those interfaces where appropriate, but
keeping behavior entirely consistent.
The rest experiment slightly with using the interface to refine some of the properties of
filesystem devices.
The number of patches is large and I don't want to inundate the mailing list, so I'm trying
this.
- mulhern
9 years, 2 months