Merge pull request 'refs #2688 pass a new parameter "gen-script" to Configurar' (#57) from configurar-gen-script into main
Reviewed-on: #57gen-script-faster 8.1.0
commit
8b89ff9171
|
@ -6,6 +6,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).
|
||||
|
||||
## [8.1.0] - 2025-08-28
|
||||
|
||||
### Changed
|
||||
|
||||
- Pass a new parameter "gen-script" to Configurar
|
||||
|
||||
## [8.0.0] - 2025-08-08
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -560,6 +560,7 @@ class ogAdmClientWorker (ogLiveWorker):
|
|||
cfg = post_params['cfg']
|
||||
ids = post_params['ids']
|
||||
check_sizes = str ('check-sizes' in post_params and 'true' == post_params['check-sizes']).lower()
|
||||
gen_script = str ('gen-script' in post_params and 'true' == post_params['gen-script']).lower()
|
||||
|
||||
if 'true' != check_sizes: self.muestraMensaje (4)
|
||||
|
||||
|
@ -581,8 +582,9 @@ class ogAdmClientWorker (ogLiveWorker):
|
|||
|
||||
cfg_str = f'{disk_info_str}!{part_info_str}%'
|
||||
|
||||
script_out = f'/tmp/ConfigurarScript-{self.IPlocal}'
|
||||
try:
|
||||
self.interfaceAdmin (nfn, ['ignored', cfg_str, check_sizes])
|
||||
self.interfaceAdmin (nfn, ['ignored', cfg_str, script_out, check_sizes, gen_script])
|
||||
if 'true' != check_sizes: self.muestraMensaje (14)
|
||||
herror = 0
|
||||
except:
|
||||
|
@ -599,6 +601,9 @@ class ogAdmClientWorker (ogLiveWorker):
|
|||
logger.warning ('No se ha podido recuperar la configuración de las particiones del disco')
|
||||
return {}
|
||||
cmd['cfg'] = self.cfg2obj (cfg)
|
||||
if 'true' == gen_script:
|
||||
script_contents = Path (script_out).read_bytes()
|
||||
cmd['script'] = base64.b64encode (script_contents).decode ('utf-8')
|
||||
|
||||
self.muestraMenu()
|
||||
return self.respuestaEjecucionComando (cmd, herror, ids)
|
||||
|
|
Loading…
Reference in New Issue