[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH] Override previously defined mountpoints in kickstart (#499746).
- From: Chris Lumens <clumens redhat com>
- To: anaconda-devel-list redhat com
- Cc:
- Subject: [PATCH] Override previously defined mountpoints in kickstart (#499746).
- Date: Mon, 11 May 2009 10:07:31 -0400
---
kickstart.py | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/kickstart.py b/kickstart.py
index a95762e..eb79bd9 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -424,6 +424,15 @@ class LogVol(commands.logvol.F9_LogVol):
devicetree.registerAction(ActionCreateFormat(device, format))
else:
+ # If a previous device has claimed this mount point, delete the
+ # old one.
+ try:
+ if format.mountpoint:
+ device = storage.fsset.mountpoints[format.mountpoint]
+ storage.destroyDevice(device)
+ except KeyError:
+ pass
+
request = storage.newLV(format=format,
name=lvd.name,
vg=vg,
@@ -663,6 +672,15 @@ class Partition(commands.partition.F9_Partition):
devicetree.registerAction(ActionCreateFormat(device, kwargs["format"]))
else:
+ # If a previous device has claimed this mount point, delete the
+ # old one.
+ try:
+ if pd.mountpoint:
+ device = storage.fsset.mountpoints[pd.mountpoint]
+ storage.destroyDevice(device)
+ except KeyError:
+ pass
+
request = storage.newPartition(**kwargs)
# FIXME: no way to specify an fsprofile right now
@@ -790,6 +808,15 @@ class Raid(commands.raid.F9_Raid):
devicetree.registerAction(ActionCreateFormat(device, kwargs["format"]))
else:
+ # If a previous device has claimed this mount point, delete the
+ # old one.
+ try:
+ if rd.mountpoint:
+ device = storage.fsset.mountpoints[rd.mountpoint]
+ storage.destroyDevice(device)
+ except KeyError:
+ pass
+
request = storage.newMDArray(**kwargs)
# FIXME: no way to specify an fsprofile right now
--
1.6.1.3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]