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
|
||||
to give less/partial information for user readability.
|
||||
"""
|
||||
return {
|
||||
'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>'
|
||||
}
|
||||
return self.path
|
||||
|
||||
def __dump__(self):
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -190,6 +190,10 @@ def perform_filesystem_operations():
|
|||
archinstall.log(user_configuration, level=logging.INFO)
|
||||
with open("/var/log/archinstall/user_configuration.json", "w") as config_file:
|
||||
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()
|
||||
|
||||
if archinstall.arguments.get('dry_run'):
|
||||
|
|
|
|||
Loading…
Reference in New Issue