refs #2497 now Configurar.py is able to just make checks
parent
7f8a2fb3b8
commit
0cbe4896ec
|
@ -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.29.0] - 2025-07-17
|
||||
|
||||
### Changed
|
||||
|
||||
- Now Configurar.py takes a third parameter: whether just check stuff or not
|
||||
|
||||
## [0.28.0] - 2025-07-17
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -10,11 +10,6 @@ import FileSystemLib
|
|||
import DiskLib
|
||||
import InventoryLib
|
||||
|
||||
#Load engine configurator from engine.cfg file.
|
||||
#Carga el configurador del engine desde el fichero engine.cfg
|
||||
## (ogGlobals se encarga)
|
||||
|
||||
# Clear temporary file used as log track by httpdlog
|
||||
# Limpia los ficheros temporales usados como log de seguimiento para httpdlog
|
||||
open (ogGlobals.OGLOGSESSION, 'w').close()
|
||||
open (ogGlobals.OGLOGCOMMAND, 'w').close()
|
||||
|
@ -23,28 +18,12 @@ open (ogGlobals.OGLOGCOMMAND+'.tmp', 'w').close()
|
|||
# Registro de inicio de ejecución
|
||||
SystemLib.ogEcho (['log', 'session'], None, f'{ogGlobals.lang.MSG_INTERFACE_START} {sys.argv}')
|
||||
|
||||
# Solo ejecutable por OpenGnsys Client.
|
||||
#path = os.getenv('PATH')
|
||||
#if path:
|
||||
# os.environ['PATH'] = f"{path}:{os.path.dirname(__name__)}"
|
||||
prog = os.path.basename(__name__)
|
||||
|
||||
#____________________________________________________________________
|
||||
#
|
||||
# El parámetro $2 es el que aporta toda la información y el $1 se queda obsoleto
|
||||
# Formato de entrada:
|
||||
# dis=Número de disco
|
||||
# != caracter de separación
|
||||
#
|
||||
# Y un numero indeterminado de cadenas del tipo siguuenteseparadas por el caracter '$':
|
||||
# par=Número de particion*cod=Código de partición*sfi=Sistema de ficheros*tam=Tamaño de la partición*ope=Operación
|
||||
# @= caracter de separación
|
||||
#____________________________________________________________________
|
||||
|
||||
# Captura de parámetros (se ignora el 1er parámetro y se eliminan espacios y tabuladores).
|
||||
#param='dis=1!par=1*cpt=NTFS*sfi=NTFS*tam=11000000*ope=0%'
|
||||
#param = ''.join(sys.argv[2:]).replace(' ', '').replace('\t', '')
|
||||
param = sys.argv[2]
|
||||
param = sys.argv[2]
|
||||
check_sizes = False
|
||||
if len (sys.argv) >= 4:
|
||||
check_sizes = 'true' == sys.argv[3]
|
||||
|
||||
# Leer los dos bloques de parámetros, separados por '!'.
|
||||
tbprm = param.split ('!')
|
||||
|
@ -223,6 +202,9 @@ if sum_tam_sectors > space_left_by_cache:
|
|||
SystemLib.ogRaiseError (['log', 'session'], ogGlobals.OG_ERR_CACHE, f'las particiones no caben en el disco')
|
||||
sys.exit (1)
|
||||
|
||||
if check_sizes: sys.exit (0)
|
||||
|
||||
|
||||
#____________________________________________________
|
||||
#
|
||||
# Proceso
|
||||
|
|
Loading…
Reference in New Issue