summaryrefslogtreecommitdiffstats
path: root/kickstart.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2005-01-14 20:02:55 +0000
committerChris Lumens <clumens@redhat.com>2005-01-14 20:02:55 +0000
commit8848fbd496d9de921868f2e8548d0e96b65d7065 (patch)
tree421911dd72397dab75207f3afa336d14058dbd3a /kickstart.py
parentdf73b6fdaffc6cf5922d7dfc2e79f53ea24284b6 (diff)
downloadanaconda-8848fbd496d9de921868f2e8548d0e96b65d7065.tar.gz
anaconda-8848fbd496d9de921868f2e8548d0e96b65d7065.tar.xz
anaconda-8848fbd496d9de921868f2e8548d0e96b65d7065.zip
Support bytes per inode on a per-partition basis (#57550).
Diffstat (limited to 'kickstart.py')
-rw-r--r--kickstart.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/kickstart.py b/kickstart.py
index b607b2e90..bca47b6e7 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -933,6 +933,7 @@ class KickstartBase(BaseInstallClass):
'fstype=',
'percent=',
'maxsize=',
+ 'bytes-per-inode=',
'grow',
'recommended',
'noformat',
@@ -949,6 +950,7 @@ class KickstartBase(BaseInstallClass):
format = 1
recommended = None
preexist = 0
+ bytesPerInode = None
for n in args:
(str, arg) = n
@@ -964,6 +966,8 @@ class KickstartBase(BaseInstallClass):
percent = int(arg)
elif str == '--maxsize':
maxSizeMB = int(arg)
+ elif str == '--bytes-per-inode':
+ bytesPerInode = int(arg)
elif str == '--grow':
grow = 1
elif str == '--recommended':
@@ -1020,7 +1024,9 @@ class KickstartBase(BaseInstallClass):
lvname = name,
grow = grow,
maxSizeMB=maxSizeMB,
- preexist = preexist)
+ preexist = preexist,
+ bytesPerInode = bytesPerInode)
+
self.addPartRequest(id.partitions, request)
@@ -1187,6 +1193,7 @@ class KickstartBase(BaseInstallClass):
end = None
badblocks = None
recommended = None
+ bytesPerInode = None
(args, extra) = isys.getopt(args, '', [ 'size=', 'maxsize=',
'grow', 'onpart=', 'ondisk=',
@@ -1213,7 +1220,7 @@ class KickstartBase(BaseInstallClass):
if disk is None:
raise KickstartValueError, "Specified BIOS disk %s cannot be determined" %(arg,)
elif str == '--bytes-per-inode':
- fsopts = ['-i', arg]
+ bytesPerInode = int(arg)
# XXX this doesn't do anything right now
elif str == '--type':
type = int(arg)
@@ -1294,15 +1301,13 @@ class KickstartBase(BaseInstallClass):
if disk and disk not in isys.hardDriveDict().keys():
raise KickstartValueError, "specified disk %s in partition command which does not exist" %(disk,)
- # XXX bytes per inode is the only per fs option at the moment
- # and we can assume that it works like this since it only works
- # with ext[23]
if fsopts:
filesystem.extraFormatArgs.extend(fsopts)
request = partRequests.PartitionSpec(filesystem,
mountpoint = mountpoint,
- format = 1)
+ format = 1,
+ bytesPerInode = bytesPerInode)
if size is not None:
request.size = size