parent
61b64dea9e
commit
401f231086
|
@ -14,25 +14,8 @@ config_file = os.path.join(PROGRAM_DIR, 'config.json')
|
|||
with open(config_file, 'r') as f:
|
||||
config = json.load(f)
|
||||
|
||||
# Extraer parámetros de configuración
|
||||
ogcore_ip_port = config['ogCore_ServerIP']
|
||||
if ':' in ogcore_ip_port:
|
||||
OGCORE_IP, OGCORE_PORT = ogcore_ip_port.split(':')
|
||||
else:
|
||||
OGCORE_IP = ogcore_ip_port
|
||||
OGCORE_PORT = "8443"
|
||||
|
||||
ogboot_ip_port = config['ogBoot_ServerIP']
|
||||
if ':' in ogboot_ip_port:
|
||||
OGBOOT_IP, OGBOOT_PORT = ogboot_ip_port.split(':')
|
||||
else:
|
||||
OGBOOT_IP = ogboot_ip_port
|
||||
OGBOOT_PORT = "8082"
|
||||
|
||||
oglive_iso_url = config["ogLive_Default"]
|
||||
# Extraer parámetros relevantes
|
||||
INSTALL_OGBOOT_TARGET = config["ogBoot_Dir"]
|
||||
OPENGNSYS_CLIENT_USER = config["ogBootSambaUser"]
|
||||
OPENGNSYS_CLIENT_PASSWD = config["ogBootSambaPass"]
|
||||
|
||||
|
||||
def og_boot_copy_files():
|
||||
|
@ -40,7 +23,6 @@ def og_boot_copy_files():
|
|||
Copia los archivos necesarios al punto de montaje de ogBoot.
|
||||
Preserva el directorio client/images si existe.
|
||||
"""
|
||||
# repo_dir = os.path.join(PROGRAM_DIR)
|
||||
repo_dir = os.path.dirname(PROGRAM_DIR) # Ruta al directorio ogboot
|
||||
directories = {
|
||||
"bin": os.path.join(repo_dir, "bin"),
|
||||
|
|
|
@ -1,38 +1,17 @@
|
|||
import os
|
||||
import json
|
||||
import subprocess
|
||||
import tempfile
|
||||
import logging
|
||||
|
||||
# Configuración básica del logger
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Cargar configuración desde config.json
|
||||
PROGRAM_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
config_file = os.path.join(PROGRAM_DIR, 'config.json')
|
||||
with open(config_file, 'r') as f:
|
||||
config = json.load(f)
|
||||
|
||||
# Extraer parámetros de configuración
|
||||
ogcore_ip_port = config['ogCore_ServerIP']
|
||||
if ':' in ogcore_ip_port:
|
||||
OGCORE_IP, OGCORE_PORT = ogcore_ip_port.split(':')
|
||||
else:
|
||||
OGCORE_IP = ogcore_ip_port
|
||||
OGCORE_PORT = "8443"
|
||||
|
||||
ogboot_ip_port = config['ogBoot_ServerIP']
|
||||
if ':' in ogboot_ip_port:
|
||||
OGBOOT_IP, OGBOOT_PORT = ogboot_ip_port.split(':')
|
||||
else:
|
||||
OGBOOT_IP = ogboot_ip_port
|
||||
OGBOOT_PORT = "8082"
|
||||
|
||||
oglive_iso_url = config["ogLive_Default"]
|
||||
INSTALL_OGBOOT_TARGET = config["ogBoot_Dir"]
|
||||
OPENGNSYS_CLIENT_USER = config["ogBootSambaUser"]
|
||||
OPENGNSYS_CLIENT_PASSWD = config["ogBootSambaPass"]
|
||||
|
||||
|
||||
def update_ipxe_boot_files():
|
||||
|
@ -101,6 +80,7 @@ def update_ipxe_boot_files():
|
|||
logger.info("Proceso completado exitosamente.")
|
||||
return True
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
if update_ipxe_boot_files():
|
||||
|
|
Loading…
Reference in New Issue