summaryrefslogtreecommitdiffstats
path: root/kickstart.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2003-05-20 21:02:47 +0000
committerMike Fulbright <msf@redhat.com>2003-05-20 21:02:47 +0000
commitbea4feb067c05ccc2ddc7743e42a40a83ac6f660 (patch)
tree6f2c86d66b9888676246f5b76ef7197c8e4ae21a /kickstart.py
parentedc9bb81130c16730d38b3871e6530a335928720 (diff)
downloadanaconda-bea4feb067c05ccc2ddc7743e42a40a83ac6f660.tar.gz
anaconda-bea4feb067c05ccc2ddc7743e42a40a83ac6f660.tar.xz
anaconda-bea4feb067c05ccc2ddc7743e42a40a83ac6f660.zip
addresses bug #71840 - prevent ks config from specifying two logvols with same vg:lv key
Diffstat (limited to 'kickstart.py')
-rw-r--r--kickstart.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/kickstart.py b/kickstart.py
index 4e2b11fc3..03d203178 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -809,12 +809,18 @@ class KickstartBase(BaseInstallClass):
raise RuntimeError, "Must specify the size of a logical volume"
if percent and percent <= 0 or percent > 100:
raise ValueError, "Logical Volume percentage must be between 0 and 100 percent"
+
if not name:
raise RuntimeError, "Must specify a logical volume name"
+ vgid = self.ksVGMapping[vgname]
+ for areq in id.partitions.autoPartitionRequests:
+ if areq.type == REQUEST_LV:
+ if areq.volumeGroup == vgid and areq.logicalVolumeName == name:
+ raise ValueError, "Logical volume name %s already used in volume group %s" % (name,vgname)
+
if not self.ksVGMapping.has_key(vgname):
raise ValueError, "Logical volume specifies a non-existent volume group"
- vgid = self.ksVGMapping[vgname]
request = partRequests.LogicalVolumeRequestSpec(filesystem,
format = format,