summaryrefslogtreecommitdiffstats
path: root/kickstart.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-06-09 02:03:40 +0000
committerJeremy Katz <katzj@redhat.com>2002-06-09 02:03:40 +0000
commitab12ab6cfde4c19414d11cd45cf09e68ed4b8d88 (patch)
tree2c564affedcc5023f65f80a098994c107c0c802f /kickstart.py
parent15d4de1f2d6f3f45b96cc640daf478751f83a8b4 (diff)
downloadanaconda-ab12ab6cfde4c19414d11cd45cf09e68ed4b8d88.tar.gz
anaconda-ab12ab6cfde4c19414d11cd45cf09e68ed4b8d88.tar.xz
anaconda-ab12ab6cfde4c19414d11cd45cf09e68ed4b8d88.zip
you can specify lv percentage in kickstart
Diffstat (limited to 'kickstart.py')
-rw-r--r--kickstart.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/kickstart.py b/kickstart.py
index 7e93dcda9..89b00ed30 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -668,13 +668,15 @@ class KickstartBase(BaseInstallClass):
(args, extra) = isys.getopt(args, '', [ 'vgname=',
'size=',
'name=',
- 'fstype=' ])
+ 'fstype=',
+ 'percent='])
mountpoint = None
vgname = None
size = None
name = None
fstype = None
+ percent = None
format = 1
for n in args:
@@ -687,6 +689,8 @@ class KickstartBase(BaseInstallClass):
name = arg
elif str == '--fstype':
fstype = arg
+ elif str == '--percent':
+ percent = int(arg)
else:
print str, " ", arg
@@ -703,7 +707,7 @@ class KickstartBase(BaseInstallClass):
if not vgname:
raise RuntimeError, "Must specify the volume group for the logical volume to be in"
- if not size:
+ if not size and not percent:
raise RuntimeError, "Must specify the size of a logical volume"
if not name:
raise RuntimeError, "Must specify a logical volume name"
@@ -716,6 +720,7 @@ class KickstartBase(BaseInstallClass):
format = format,
mountpoint = mountpoint,
size = size,
+ percent = percent,
volgroup = vgid,
lvname = name)
id.partitions.autoPartitionRequests.append(request)