Commit 1d24f530 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Added root_size option

parent 38a19898
......@@ -195,6 +195,10 @@ class Ili:
if self._preseed.has_option('storage', 'disklayout_strategy'):
self._status_callback('preseed storage -> disklayout_strategy')
self.state.disklayout_strategy = self._preseed.get('storage', 'disklayout_strategy').upper()
# Process root_size
if self._preseed.has_option('system', 'root_size'):
self._status_callback('preseed system -> root_size')
self.state.root_size = int(self._preseed.get('system', 'root_size'))
# Process system section
if self._preseed.has_section('system'):
......
......@@ -37,6 +37,8 @@ class IliState:
# Chosen strategies
_diskusage_strategy: Optional[str]
_disklayout_strategy: Optional[str]
# root size in Gbytes
_root_size: int
# Chosen hostname
_hostname: Optional[str]
# Chosen locale
......@@ -105,6 +107,7 @@ class IliState:
self._install_disks = []
self._diskusage_strategy = None
self._disklayout_strategy = None
self._root_size = 10
self._hostname = None
self._locale = 'en_US.UTF-8'
self._timezone = 'UTC'
......@@ -179,6 +182,17 @@ class IliState:
"""Set the diskusage_strategy."""
self._diskusage_strategy = value
# Root size
@property
def root_size(self):
"""Return the root_size."""
return self._root_size
@root_size.setter
def root_size(self, value: int):
"""Set the root_size."""
self._root_size = value
# Hostname
@property
def hostname(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment