diff --git a/CHANGELOG.md b/CHANGELOG.md index 5796462..51c57e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- getConfiguration.py now collects the firmware type + ## [0.1.1] - 2025-03-19 ### Added diff --git a/ogclient/interfaceAdm/Configurar.py b/ogclient/interfaceAdm/Configurar.py index d355c49..a203c29 100755 --- a/ogclient/interfaceAdm/Configurar.py +++ b/ogclient/interfaceAdm/Configurar.py @@ -9,6 +9,7 @@ import SystemLib import CacheLib import FileSystemLib import DiskLib +import InventoryLib #Load engine configurator from engine.cfg file. #Carga el configurador del engine desde el fichero engine.cfg @@ -61,22 +62,20 @@ sparam = tbprm[1] # Partitioning and formatting parameters # Toma valores de disco y caché, separados por "*". # Los valores están en las variables $dis: disco, $che: existe cache (1, 0), $tch: Tamaño de la cache. tbprm = pparam.split ('*') -dis = ptt = tch = None +dis = tch = None for item in tbprm: if '=' not in item: continue k, v = item.split ('=', 1) - if k not in ['dis', 'tch', 'ptt']: ## 'ptt' added, unused 'che' removed + if k not in ['dis', 'tch']: print (f'ignoring unknown disk parameter ({k})') continue if 'dis' == k: dis = int (v) - elif 'ptt' == k: ptt = v elif 'tch' == k: tch = v # Error si no se define el parámetro de disco (dis). if dis is None: sys.exit (ogGlobals.OG_ERR_FORMAT) -if ptt is None: ptt = 'MSDOS' if tch is None: tch = '0' # Toma valores de distribución de particiones, separados por "%". @@ -138,11 +137,10 @@ CacheLib.ogUnmountCache() # Elimina la tabla de particiones cur_ptt = DiskLib.ogGetPartitionTableType (dis) +ptt = 'GPT' if InventoryLib.ogIsEfiActive() else 'MSDOS' if not cur_ptt or ptt != cur_ptt: DiskLib.ogDeletePartitionTable (dis) SystemLib.ogExecAndLog ('command', DiskLib.ogUpdatePartitionTable) - - # Crea tabla de particiones MSDOS (NOTA: adaptar para tablas GPT). DiskLib.ogCreatePartitionTable (dis, ptt) # Inicia la cache.