summaryrefslogtreecommitdiffstats
path: root/src/utils/image.py
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-04-22 10:59:55 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-07-29 15:07:22 +0200
commit567fea276e16902be01f80cfb7be335f8d414622 (patch)
treef249f8264bf07a1b195dd5d722196d71b2e29cd5 /src/utils/image.py
parent9d5291f47ae409a480b42f793c72a780b7a8afc6 (diff)
utils: add postinstall.py
Replace ConfigureOs script by native calls to: - update BCD via hivex using bcd.py and winreg.py infrastructure. - restore efi bootloader restore_windows_efi_bootloader(). Call legacy scripts for remaining postinstall procedures to replace them incrementally. Define variable CONFIGUREOS_LEGACY_ENABLED as False by default. Run legacy configureOs when CONFIGUREOS_LEGACY_ENABLED = True. This serves as a auxiliar method to keep the restoration functional in case of problems with the new configure_os logic.
Diffstat (limited to 'src/utils/image.py')
-rw-r--r--src/utils/image.py21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/utils/image.py b/src/utils/image.py
index fe48a9c..a12c221 100644
--- a/src/utils/image.py
+++ b/src/utils/image.py
@@ -234,24 +234,3 @@ def restoreImageCustom(repo_ip, image_name, disk, partition, method):
except OSError as e:
raise OgError(f'Error processing restoreImageCustom: {e}') from e
return proc.returncode
-
-
-def configureOs(disk, partition):
- """
- """
- if shutil.which('configureOsCustom'):
- cmd_configure = f"configureOsCustom {disk} {partition}"
- else:
- cmd_configure = f"configureOs {disk} {partition}"
-
- try:
- proc = subprocess.run(cmd_configure,
- stdout=PIPE,
- encoding='utf-8',
- shell=True,
- check=True)
- out = proc.stdout
- except OSError as e:
- raise OgError(f'Error processing configureOsCustom: {e}') from e
-
- return out