Saving partitioning layout in a layout file (JSON format)
This commit is contained in:
parent
e965eaf546
commit
51f2eca60e
|
|
@ -243,11 +243,7 @@ class BlockDevice:
|
||||||
json() has precedence over __dump__, so this is a way
|
json() has precedence over __dump__, so this is a way
|
||||||
to give less/partial information for user readability.
|
to give less/partial information for user readability.
|
||||||
"""
|
"""
|
||||||
return {
|
return self.path
|
||||||
'path': self.path,
|
|
||||||
'size': self.info['size'] if 'size' in self.info else '<unknown>',
|
|
||||||
'model': self.info['model'] if 'model' in self.info else '<unknown>'
|
|
||||||
}
|
|
||||||
|
|
||||||
def __dump__(self):
|
def __dump__(self):
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,10 @@ def perform_filesystem_operations():
|
||||||
archinstall.log(user_configuration, level=logging.INFO)
|
archinstall.log(user_configuration, level=logging.INFO)
|
||||||
with open("/var/log/archinstall/user_configuration.json", "w") as config_file:
|
with open("/var/log/archinstall/user_configuration.json", "w") as config_file:
|
||||||
config_file.write(user_configuration)
|
config_file.write(user_configuration)
|
||||||
|
user_disk_layout = json.dumps(archinstall.storage['disk_layouts'], indent=4, sort_keys=True, cls=archinstall.JSON)
|
||||||
|
archinstall.log(user_disk_layout, level=logging.INFO)
|
||||||
|
with open("/var/log/archinstall/user_disk_layout.json", "w") as disk_layout_file:
|
||||||
|
disk_layout_file.write(user_disk_layout)
|
||||||
print()
|
print()
|
||||||
|
|
||||||
if archinstall.arguments.get('dry_run'):
|
if archinstall.arguments.get('dry_run'):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue