From 567fea276e16902be01f80cfb7be335f8d414622 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Mon, 22 Apr 2024 10:59:55 +0200 Subject: 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. --- src/live/ogOperations.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/live') diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index 7958e9e..d4817f6 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -23,6 +23,7 @@ from src.live.partcodes import GUID_MAP from src.live.parttypes import get_parttype from src.utils.image import * +from src.utils.postinstall import configure_os from src.utils.net import ethtool from src.utils.menu import generate_menu from src.utils.fs import * @@ -455,14 +456,14 @@ class OgLiveOperations: return result def image_restore(self, request, ogRest): - disk = request.getDisk() - partition = request.getPartition() + disk = int(request.getDisk()) + partition = int(request.getPartition()) name = request.getName() repo = request.getRepo() ctype = request.getType() profile = request.getProfile() cid = request.getId() - partdev = get_partition_device(int(disk), int(partition)) + partdev = get_partition_device(disk, partition) self._ogbrowser_clear_logs() self._restartBrowser(self._url_log) @@ -477,7 +478,7 @@ class OgLiveOperations: elif ctype == 'TIPTORRENT': self._restore_image_tiptorrent(repo, name, partdev) - configureOs(disk, partition) + configure_os(disk, partition) self.refresh(ogRest) -- cgit v1.2.3-18-g5258