summaryrefslogtreecommitdiffstats
path: root/src/live
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/live
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/live')
-rw-r--r--src/live/ogOperations.py9
1 files changed, 5 insertions, 4 deletions
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)