Merge pull request 'refs #2301 write a mark for ogboot on linux only' (#66) from boot-mark-linux-only into main
ogclient/pipeline/head This commit looks good Details
ogclient/pipeline/tag This commit looks good Details

Reviewed-on: #66
ogexecandlog 0.19.2
Natalia Serrano 2025-06-24 11:02:59 +02:00
commit c9c9e98359
2 changed files with 14 additions and 8 deletions

View File

@ -5,6 +5,12 @@ 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).
## [0.19.2] - 2025-06-24
### Changed
- Write a mark for ogboot on linux only
## [0.19.1] - 2025-06-23
### Fixed

View File

@ -55,14 +55,6 @@ if not FileSystemLib.ogIsWritable (disk, par):
# Nombre del cliente.
host = NetLib.ogGetHostname()
# Marca para arranque.
boot_mark_file = f'/Part-{int(disk):02d}-{int(par):02d}'
try:
open (boot_mark_file, 'w').close()
except Exception as e:
print (f'Failed to create boot mark: {e}')
sys.exit (1)
# Post-configuración personalizada para cada tipo de sistema operativo.
ostype = InventoryLib.ogGetOsType (disk, par)
if 'Windows' == ostype:
@ -88,6 +80,14 @@ if 'Windows' == ostype:
PostConfLib.ogUninstallWindowsClient (disk, par, 'postconf.cmd')
elif 'Linux' == ostype:
# Marca para arranque.
boot_mark_file = f'/Part-{int(disk):02d}-{int(par):02d}'
try:
open (boot_mark_file, 'w').close()
except Exception as e:
print (f'Failed to create boot mark: {e}')
sys.exit (1)
BootLib.ogConfigureFstab (disk, par) # Configuro fstab: particion de Swap y si es UEFI además la partición EFI.
if InventoryLib.ogIsEfiActive(): # Si es UEFI instalo Grub en la partición EFI
esp = DiskLib.ogGetEsp()