Merge pull request 'Include all client files, build debian package' (#2) from deb-package into main

Reviewed-on: #2
pull/3/head^2 0.1.0
Natalia Serrano 2025-02-28 09:16:45 +01:00
commit 680ccd868e
610 changed files with 86362 additions and 951 deletions

View File

@ -1,254 +0,0 @@
import subprocess
import sys
import os
from engine.FileLib import *
from engine.SystemLib import *
def ogChangeRepo():
SRCIMG = ""
NEWREPO = ""
REPO = ""
OGUNIT = ""
if len(sys.argv) < 2:
print("Usage: ogChangeRepo IPREPO [ OgUnit ]")
print("Example: ogChangeRepo 10.1.120.3")
print("Example: ogChangeRepo 10.1.120.3 cdc")
return
if sys.argv[1] == "help":
print("Usage: ogChangeRepo IPREPO [ OgUnit ]")
print("Example: ogChangeRepo 10.1.120.3")
print("Example: ogChangeRepo 10.1.120.3 cdc")
return
if len(sys.argv) >= 2:
NEWREPO = sys.argv[1]
# Opciones de montaje: lectura o escritura
subprocess.run(["mount", "|", "grep", "ogimages.*rw,"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
RW = ",rw" if subprocess.returncode == 0 else ",ro"
# Si REPO tomamos el repositorio y la unidad organizativa actual
REPO = ogGetRepoIp()
OGUNIT = subprocess.run(["df", "|", "awk", "-F", " ", "'/ogimages/ {sub(\"//.*/ogimages\",\"\",$1); sub(\"/\",\"\",$1); print $1}'"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL).stdout.decode().strip()
# Parametros de entrada. Si $1 = "REPO" dejo el repositorio actual
if sys.argv[1].upper() == "REPO":
NEWREPO = REPO
# Si $1 y $2 son el repositorio y la OU actual me salgo
if NEWREPO == REPO and sys.argv[2] == OGUNIT:
return 0
subprocess.run(["source", "/scripts/functions"], shell=True)
subprocess.run(["source", "/scripts/ogfunctions"], shell=True)
subprocess.run(["umount", OGIMG])
if sys.argv[2] == "":
SRCIMG = "ogimages"
else:
SRCIMG = "ogimages/" + sys.argv[2]
subprocess.run(["eval", "$(grep \"OPTIONS=\" /scripts/ogfunctions)"])
ogEcho("session", "log", MSG_HELP_ogChangeRepo + " " + NEWREPO + " " + sys.argv[2].rstrip())
ogConnect(NEWREPO, ogprotocol, SRCIMG, OGIMG, RW)
# Si da error volvemos a montar el inicial
if subprocess.returncode != 0:
ogConnect(REPO, ogprotocol, SRCIMG, OGIMG, RW)
ogRaiseError("session", OG_ERR_REPO, NEWREPO)
return subprocess.returncode
def ogGetGroupDir():
REPO = ""
DIR = ""
GROUP = ""
if len(sys.argv) < 2:
ogHelp("ogGetGroupDir", "ogGetGroupDir str_repo", "ogGetGroupDir REPO ==> /opt/opengnsys/images/groups/Grupo1")
return
if len(sys.argv) == 1:
REPO = "REPO"
else:
REPO = sys.argv[1]
GROUP = ogGetGroupName()
if GROUP:
DIR = ogGetPath(REPO, "/groups/" + GROUP, stderr=subprocess.DEVNULL)
if os.path.isdir(DIR):
print(DIR)
return 0
def ogGetGroupName():
if len(sys.argv) >= 2 and sys.argv[1] == "help":
ogHelp("ogGetGroupName", "ogGetGroupName", "ogGetGroupName => Grupo1")
return
if "group" in globals() and group:
print(group)
return 0
def ogGetHostname():
HOST = ""
if len(sys.argv) >= 2 and sys.argv[1] == "help":
ogHelp("ogGetHostname", "ogGetHostname", "ogGetHostname => pc1")
return
# Tomar nombre de la variable HOSTNAME
HOST = os.getenv("HOSTNAME")
# Si no, tomar del DHCP, opción host-name
if not HOST:
with open("/var/lib/dhcp3/dhclient.leases", "r") as f:
for line in f:
if "option host-name" in line:
HOST = line.split('"')[1]
break
# Si no, leer el parámetro del kernel hostname
if not HOST:
with open("/proc/cmdline", "r") as f:
cmdline = f.read()
HOST = re.search(r"hostname=([^ ]+)", cmdline)
if HOST:
HOST = HOST.group(1)
if HOSTNAME != HOST:
os.environ["HOSTNAME"] = HOST
if HOST:
print(HOST)
def ogGetIpAddress():
IP = ""
if len(sys.argv) >= 2 and sys.argv[1] == "help":
ogHelp("ogGetIpAddress", "ogGetIpAddress", "ogGetIpAddress => 192.168.0.10")
return
if "IPV4ADDR" in os.environ:
IP = os.environ["IPV4ADDR"]
else:
# Obtener direcciones IP.
if "DEVICE" in os.environ:
IP = subprocess.run(["ip", "-o", "address", "show", "up", "dev", os.environ["DEVICE"]], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL).stdout.decode().split()
else:
IP = subprocess.run(["ip", "-o", "address", "show", "up"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL).stdout.decode().split()
IP = [addr.split("/")[0] for addr in IP if "inet" in addr]
# Mostrar solo la primera.
if IP:
print(IP[0])
return 0
def ogGetMacAddress():
MAC = ""
if len(sys.argv) >= 2 and sys.argv[1] == "help":
ogHelp("ogGetMacAddress", "ogGetMacAddress", "ogGetMacAddress => 00:11:22:33:44:55")
return
# Obtener direcciones Ethernet.
if "DEVICE" in os.environ:
MAC = subprocess.run(["ip", "-o", "link", "show", "up", "dev", os.environ["DEVICE"]], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL).stdout.decode().split()
MAC = [addr.upper() for addr in MAC if "ether" in addr]
else:
MAC = subprocess.run(["ip", "-o", "link", "show", "up"], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL).stdout.decode().split()
MAC = [addr.upper() for addr in MAC if "ether" in addr and "lo" not in addr]
# Mostrar solo la primera.
if MAC:
print(MAC[0])
return 0
def ogGetNetInterface():
if len(sys.argv) >= 2 and sys.argv[1] == "help":
ogHelp("ogGetNetInterface", "ogGetNetInterface", "ogGetNetInterface => eth0")
return
if "DEVICE" in os.environ:
print(os.environ["DEVICE"])
return 0
def ogGetRepoIp():
# Variables locales.
SOURCE = ""
FSTYPE = ""
# Mostrar ayuda.
if len(sys.argv) >= 2 and sys.argv[1] == "help":
ogHelp("ogGetRepoIp", "ogGetRepoIp", "ogGetRepoIp => 192.168.0.2")
return
# Obtener direcciones IP, según el tipo de montaje.
output = subprocess.run(["findmnt", "-P", "-o", "SOURCE,FSTYPE", OGIMG], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL).stdout.decode().strip()
lines = output.split("\n")
for line in lines:
fields = line.split()
if len(fields) == 2:
if fields[1] == "nfs":
SOURCE = fields[0].split(":")[0]
elif fields[1] == "cifs":
SOURCE = fields[0].split("/")[2]
if SOURCE:
print(SOURCE)
return 0
def ogGetServerIp():
# Variables locales.
SOURCE = ""
FSTYPE = ""
# Mostrar ayuda.
if len(sys.argv) >= 2 and sys.argv[1] == "help":
ogHelp("ogGetServerIp", "ogGetServerIp", "ogGetServerIp => 192.168.0.2")
return
# Obtener direcciones IP, según el tipo de montaje.
output = subprocess.run(["findmnt", "-P", "-o", "SOURCE,FSTYPE", OGIMG], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL).stdout.decode().strip()
lines = output.split("\n")
for line in lines:
fields = line.split()
if len(fields) == 2:
if fields[1] == "nfs":
SOURCE = fields[0].split(":")[0]
elif fields[1] == "cifs":
SOURCE = fields[0].split("/")[2]
if SOURCE:
print(SOURCE)
return 0
def ogMakeGroupDir():
REPO = ""
DIR = ""
GROUP = ""
if len(sys.argv) < 2:
ogHelp("ogMakeGroupDir", "ogMakeGroupDir str_repo", "ogMakeGroupDir", "ogMakeGroupDir REPO")
return
if len(sys.argv) == 1:
REPO = "REPO"
else:
REPO = sys.argv[1]
DIR = ogGetPath(REPO, "/groups/" + ogGetGroupName(), stderr=subprocess.DEVNULL)
if DIR:
subprocess.run(["mkdir", "-p", DIR], stderr=subprocess.DEVNULL)
return 0

View File

@ -1,59 +0,0 @@
import os
import subprocess
print (">>>>>>>>>>>>>>>>>>>> Load ", __name__, " <<<<<<<<<<<<<<<<<<<<<<")
print("==============================================")
print("OpenGnsys Clonning Engine Start...")
# Cargar entorno de OpenGnsys
#os.environ['OGETC'] = '/opt/opengnsys/etc' #Entorno opengnsys
os.environ['OGETC'] = 'etc' #Pruebas locales
print (f"OGETC: {os.environ['OGETC']}")
os.environ['PYTHONUNBUFFERED'] = '1'
print (f"PYTHONUNBUFFERED: {os.environ['PYTHONUNBUFFERED']}")
#loadenviron_path = os.path.join(os.environ['OGETC'], 'preinit', 'loadenviron.sh')
loadenviron_path = os.path.join(os.environ['OGETC'], 'preinit', 'loadenviron.py')
print (f"loadenviron_path: {loadenviron_path}")
print ("s//////////////////////////////////////////////////")
# Ejecutar el script y cargar las variables de entorno en Python
exec(open(loadenviron_path).read())
# Configurar las variables de entorno globales
for key, value in globals().items():
if isinstance(value, str):
os.environ[key] = value
print ("Variables de entorno cargadas desde loadenviron.py")
# Ejecutar un subproceso que utilizará las nuevas variables de entorno
################################################################################subprocess.run(['bash', '-c', 'env'], shell=True)
# Scripts de inicio
print ("step 2.1 >>>>>>>>>>>>>>>>>>>>>>>>>>")
scripts = ['fileslinks', 'loadmodules', 'metadevs', 'mountrepo', 'poweroff', 'otherservices']
for script in scripts:
script_path = os.path.join(os.environ['OGETC'], 'preinit', f'{script}.py')
print (f"<<<<<< script_path: {script_path}")
#subprocess.run(['bash', script_path])
subprocess.run(['python3', script_path])
print ("step 2.2 >>>>>>>>>>>>>>>>>>>>>>>>>>")
# Check and run the appropriate init script
init_scripts = [
os.path.join(os.environ['OGETC'], 'init', f'{os.environ.get("IPV4ADDR", "")}.sh'),
os.path.join(os.environ['OGETC'], 'init', f'{os.environ.get("OGGROUP", "")}.sh'),
os.path.join(os.environ['OGETC'], 'init', 'default.sh')
]
print ("step 2.3 >>>>>>>>>>>>>>>>>>>>>>>>>>")
for script in init_scripts:
if os.path.isfile(script):
subprocess.run(['bash', script])
break
else:
print("No se ha encontrado script de inicio (RUN halt)")
#subprocess.run(['halt'])
print("OpenGnsys Clonning Engine End.")
print("==============================================")

View File

@ -1,74 +0,0 @@
import os
import shutil
import stat
# Si está configurado OpenGnsys ...
if os.getenv("OPENGNSYS"):
print(os.getenv("MSG_MAKELINKS", "."))
# Shell BASH por defecto (para usar "runtest")
try:
os.symlink('/bin/bash', '/bin/sh')
except FileExistsError:
pass
# Crear directorio de bloqueos
os.makedirs('/var/lock', exist_ok=True)
if not os.path.exists('/var/lock'):
os.makedirs('/run/lock', exist_ok=True)
# Crear ficheros temporales.
oglogcommand = os.getenv("OGLOGCOMMAND")
oglogsession = os.getenv("OGLOGSESSION")
temp_files = [oglogcommand, f"{oglogcommand}.tmp", oglogsession, "/tmp/menu.tmp"]
for temp_file in temp_files:
with open(temp_file, 'a'):
os.utime(temp_file, None)
os.chmod(temp_file, 0o777)
#####################################################################################
##### Pendiente instalar Qt5 en el sistema y crear enlaces simbólicos a las librerías
# Enlaces para Qt Embeded. ######################################################
qtdir = "/usr/local"
os.makedirs(os.path.join(qtdir, 'etc'), exist_ok=True)
os.makedirs(os.path.join(qtdir, 'lib'), exist_ok=True)
os.makedirs(os.path.join(qtdir, 'plugins'), exist_ok=True)
oglib = os.getenv("OGLIB")
for i in os.listdir(os.path.join(oglib, 'qtlib')) + [os.path.join(oglib, 'fonts')]:
src = os.path.join(oglib, 'qtlib', i)
dst = os.path.join(qtdir, 'lib', i)
if not os.path.exists(dst):
try:
os.symlink(src, dst)
except FileExistsError:
pass
for i in os.listdir(os.path.join(oglib, 'qtplugins')):
src = os.path.join(oglib, 'qtplugins', i)
dst = os.path.join(qtdir, 'plugins', i)
if not os.path.exists(dst):
try:
os.symlink(src, dst)
except FileExistsError:
pass
ogetc = os.getenv("OGETC")
for i in os.listdir(ogetc):
if i.endswith('.qmap'):
src = os.path.join(ogetc, i)
dst = os.path.join(qtdir, 'etc', i)
if not os.path.exists(dst):
try:
os.symlink(src, dst)
except FileExistsError:
pass
# Autenticación con clave pública para SSH
if os.path.isfile('/scripts/ssl/authorized_keys'):
for file in os.listdir('/scripts/ssl'):
shutil.copy(os.path.join('/scripts/ssl', file), '/root/.ssh')
else:
# FIXME Error: entorno de OpenGnsys no configurado.
print("Error: OpenGnsys environment is not configured.") # FIXME: definir mensaje.
exit(1)

View File

@ -1,215 +0,0 @@
import os
import subprocess
import sys
sys.path.append('/opt/opengnsys/client/lib/engine/bin')
from NetLib import *
print(f"##################+++++++++++++++ {sys.path} ++++++++++++++################3")
print(" ")
print("=============== path =================")
print("-- step 0")
print(sys.path)
#!/usr/bin/env python3
# Cargar API de funciones.
def execute_lib_file(filepath):
with open(filepath) as f:
code = compile(f.read(), filepath, 'exec')
exec(code, globals())
print("=============== START LOAD ENVIRONMENT =================")
# Idioma por defecto.
os.environ["LANG"] = os.getenv("LANG", "es_ES")
print("-- step 2")
os.environ["LC_ALL"] = os.getenv("LC_ALL", os.environ["LANG"])
print("-- step 3")
result = subprocess.run(["locale-gen", os.environ["LANG"]], capture_output=True, text=True)
if result.returncode != 0:
print(f"Error generating locale: {result.stderr}")
print("-- step 4")
print("-- step 5")
# Directorios del proyecto OpenGnsys.
os.environ["OPENGNSYS"] = os.getenv("OPENGNSYS", "/opt/opengnsys")
opengnsys_path = os.environ['OPENGNSYS']
print(f"OPENGNSYS Directory: {opengnsys_path}")
print("-- step 6")
print (f"OPENGNSYS: {os.environ['OPENGNSYS']}")
if os.path.isdir(os.environ["OPENGNSYS"]):
print("OPENGNSYS directory found")
os.environ["OGBIN"] = os.path.join(os.environ["OPENGNSYS"], "bin")
os.environ["OGETC"] = os.path.join(os.environ["OPENGNSYS"], "etc")
os.environ["OGLIB"] = os.path.join(os.environ["OPENGNSYS"], "lib")
os.environ["OGAPI"] = os.path.join(os.environ["OGLIB"], "engine", "bin")
os.environ["OGSCRIPTS"] = os.path.join(os.environ["OPENGNSYS"], "scripts")
os.environ["OGIMG"] = os.path.join(os.environ["OPENGNSYS"], "images")
os.environ["OGCAC"] = os.path.join(os.environ["OPENGNSYS"], "cache")
os.environ["OGLOG"] = os.path.join(os.environ["OPENGNSYS"], "log")
os.environ["PATH"] = os.pathsep.join([
os.environ["PATH"],
"/sbin",
"/usr/sbin",
"/usr/local/sbin",
"/bin",
"/usr/bin",
"/usr/local/bin",
"/opt/oglive/rootfs/opt/drbl/sbin",
os.environ["OGSCRIPTS"],
os.environ["OGAPI"],
os.environ["OGBIN"]
])
print("-- step 7")
# Exportar parámetros del kernel.
with open("/proc/cmdline") as f:
for i in f.read().split():
if "=" in i:
key, value = i.split("=", 1)
os.environ[key] = value
print("-- step 8")
# Cargar fichero de idioma.
lang_file = os.path.join(os.environ["OGETC"], f"lang.{os.environ['LANG'].split('@')[0]}.conf")
if os.path.isfile(lang_file):
with open(lang_file) as f:
for line in f:
if "=" in line:
key, value = line.strip().split("=", 1)
os.environ[key] = value
print("-- step 9")
# Mensaje de carga del entorno.
print(os.getenv("MSG_LOADAPI", "."))
print("-- step 10")
# Cargar mapa de teclado.
subprocess.run(["loadkeys", os.environ["LANG"].split("_")[0]], stdout=subprocess.DEVNULL)
print("-- step 10.1")
# Imprimir todas las variables de entorno declaradas hasta el momento.
for key, value in os.environ.items():
print(f"{key}: {value}")
print("-- step 11")
for lib_file in os.listdir(os.environ["OGAPI"]):
if lib_file.endswith(".lib"):
execute_lib_file(os.path.join(os.environ["OGAPI"], lib_file))
# for lib_file in os.listdir(os.environ["OGAPI"]):
# if lib_file.endswith(".lib"):
# exec(open(os.path.join(os.environ["OGAPI"], lib_file)).read())
print("-- step 12")
# Cargar configuración del engine.
engine_cfg = os.path.join(os.environ["OGETC"], "engine.cfg")
if os.path.isfile(engine_cfg):
exec(open(engine_cfg).read())
os.environ["OGLOGCOMMAND"] = os.getenv("OGLOGCOMMAND", "/tmp/command.log")
os.environ["OGLOGSESSION"] = os.getenv("OGLOGSESSION", "/tmp/session.log")
print("-- step 13")
# Cargar las APIs según engine.
ogengine = os.getenv("ogengine")
if ogengine:
for api_file in os.listdir(os.environ["OGAPI"]):
if api_file.endswith(f".{ogengine}"):
exec(open(os.path.join(os.environ["OGAPI"], api_file)).read())
print("-- step 14")
# Configuración de la red (modo offline).
initrd_cfg = "/tmp/initrd.cfg"
if os.path.isfile(initrd_cfg):
with open(initrd_cfg) as f:
for line in f:
if line.startswith("DEVICECFG="):
device_cfg = line.strip().split("=", 1)[1]
os.environ["DEVICECFG"] = device_cfg
if os.path.isfile(device_cfg):
exec(open(device_cfg).read())
print("-- step 15")
# FIXME Pruebas para grupos de ordenadores
os.environ["OGGROUP"] = os.getenv("group", "")
print("-- step 16")
root_repo = os.getenv("ROOTREPO", os.getenv("OGSERVERIMAGES"))
print(f"-- step 17",ogGetIpAddress())
# Fichero de registros.
og_log_file = os.path.join(os.environ["OGLOG"], f"{ogGetIpAddress()}.log")
os.environ["OGLOGFILE"] = og_log_file
else:
print("ERROR: OPENGNSYS directory not found")
print("-- step 18")
# Compatibilidad para usar proxy en clientes ogLive.
if not os.getenv("http_proxy") and os.getenv("ogproxy"):
os.environ["http_proxy"] = os.getenv("ogproxy")
print("-- step 19")
# Compatibilidad para usar servidor DNS en clientes ogLive.
if not os.path.isfile("/run/resolvconf/resolv.conf") and os.getenv("ogdns"):
os.makedirs("/run/resolvconf", exist_ok=True)
with open("/run/resolvconf/resolv.conf", "w") as f:
f.write(f"nameserver {os.getenv('ogdns')}\n")
print("-- step 20")
# Declaración de códigos de error.
error_codes = {
"OG_ERR_FORMAT": 1,
"OG_ERR_NOTFOUND": 2,
"OG_ERR_PARTITION": 3,
"OG_ERR_LOCKED": 4,
"OG_ERR_IMAGE": 5,
"OG_ERR_NOTOS": 6,
"OG_ERR_NOTEXEC": 7,
"OG_ERR_NOTWRITE": 14,
"OG_ERR_NOTCACHE": 15,
"OG_ERR_CACHESIZE": 16,
"OG_ERR_REDUCEFS": 17,
"OG_ERR_EXTENDFS": 18,
"OG_ERR_OUTOFLIMIT": 19,
"OG_ERR_FILESYS": 20,
"OG_ERR_CACHE": 21,
"OG_ERR_NOGPT": 22,
"OG_ERR_REPO": 23,
"OG_ERR_NOMSDOS": 24,
"OG_ERR_IMGSIZEPARTITION": 30,
"OG_ERR_UPDATECACHE": 31,
"OG_ERR_DONTFORMAT": 32,
"OG_ERR_IMAGEFILE": 33,
"OG_ERR_GENERIC": 40,
"OG_ERR_UCASTSYNTAXT": 50,
"OG_ERR_UCASTSENDPARTITION": 51,
"OG_ERR_UCASTSENDFILE": 52,
"OG_ERR_UCASTRECEIVERPARTITION": 53,
"OG_ERR_UCASTRECEIVERFILE": 54,
"OG_ERR_MCASTSYNTAXT": 55,
"OG_ERR_MCASTSENDFILE": 56,
"OG_ERR_MCASTRECEIVERFILE": 57,
"OG_ERR_MCASTSENDPARTITION": 58,
"OG_ERR_MCASTRECEIVERPARTITION": 59,
"OG_ERR_PROTOCOLJOINMASTER": 60,
"OG_ERR_DONTMOUNT_IMAGE": 70,
"OG_ERR_DONTSYNC_IMAGE": 71,
"OG_ERR_DONTUNMOUNT_IMAGE": 72,
"OG_ERR_NOTDIFFERENT": 73,
"OG_ERR_SYNCHRONIZING": 74,
"OG_ERR_NOTUEFI": 80,
"OG_ERR_NOTBIOS": 81
}
print("-- step 20")
for key, value in error_codes.items():
os.environ[key] = str(value)

View File

@ -1,29 +0,0 @@
#!/usr/bin/env python3
import os
import subprocess
import glob
"""
@file loadmodules.py
@brief Script de inicio para cargar módulos complementarios del kernel.
@version 1.0.5 - Cargar módulos específicos para el cliente.
"""
def main():
msg_loadmodules = os.getenv('MSG_LOADMODULES', '.')
print(msg_loadmodules)
# Módulo del ratón.
subprocess.run(['modprobe', 'psmouse'], stderr=subprocess.DEVNULL)
# Cargar módulos específicos del kernel del cliente.
kernel_version = os.uname().release
module_path = os.path.join(os.getenv('OGLIB', ''), 'modules', kernel_version, '*.ko')
for module in glob.glob(module_path):
if os.access(module, os.R_OK):
subprocess.run(['insmod', module], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
if __name__ == "__main__":
main()

View File

@ -1,32 +0,0 @@
import os
import subprocess
import sys
#!/usr/bin/env python3
"""
@file metadevs.py
@brief Script de inicio para detectar metadispositivos LVM y RAID.
@note Desglose del script "loadenviron.sh".
@warning License: GNU GPLv3+
"""
def main():
opengnsys = os.getenv('OPENGNSYS')
print(f"____________________________________ OpenGnsys environment: {opengnsys}")
msg_detectlvmraid = os.getenv('MSG_DETECTLVMRAID', '')
print(f"____________________________________ Message: {msg_detectlvmraid}")
if opengnsys:
print(msg_detectlvmraid)
# Detectar metadispositivos LVM.
subprocess.run(['vgchange', '-ay'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
# Detectar metadispositivos RAID.
subprocess.run(['dmraid', '-ay'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
else:
# FIXME Error: entorno de OpenGnsys no configurado.
print("Error: OpenGnsys environment is not configured.") # FIXME: definir mensaje.
sys.exit(1)
if __name__ == "__main__":
main()

View File

@ -1,62 +0,0 @@
#!/usr/bin/env python3
import os
import subprocess
#/**
# @file mountrepo.py
# @brief Script para montar el repositorio de datos remoto.
#*/
OGIMG = os.getenv('OGIMG', '/opt/opengnsys/images')
ROOTREPO = os.getenv('ROOTREPO', os.getenv('ROOTSERVER'))
ogactiveadmin = os.getenv('ogactiveadmin')
ogprotocol = os.getenv('ogprotocol', 'smb')
ogunit = os.getenv('ogunit', '')
ogstatus = os.getenv('ogstatus')
SERVER = os.getenv('SERVER')
OGCAC = os.getenv('OGCAC')
MSG_MOUNTREPO = "Mounting repository using protocol: {} in mode: {}"
def mount_repo():
if ogactiveadmin == "true":
os.environ['boot'] = 'admin' # ATENCIÓN: siempre en modo "admin".
subprocess.run(['umount', OGIMG], stderr=subprocess.DEVNULL)
protocol = ogprotocol
OGUNIT = f"/{ogunit}" if ogunit else ""
print(MSG_MOUNTREPO.format(protocol, 'admin'))
if protocol == 'nfs':
subprocess.run(['mount.nfs', f'{ROOTREPO}:{OGIMG}{OGUNIT}', OGIMG, '-o', 'rw,nolock'])
elif protocol == 'smb':
PASS = get_password()
subprocess.run(['mount.cifs', f'//{ROOTREPO}/ogimages{OGUNIT}', OGIMG, '-o', f'rw,serverino,acl,username=opengnsys,password={PASS}'])
elif protocol == 'local':
handle_local_mount()
def get_password():
try:
with open('/scripts/ogfunctions') as f:
for line in f:
if 'OPTIONS=' in line:
return line.split('pass=')[1].split()[0]
except Exception:
pass
return 'og'
def handle_local_mount():
if ogstatus == "offline" or not SERVER:
TYPE = subprocess.getoutput("blkid | grep REPO | awk -F'TYPE=' '{print $2}' | tr -d '\"'")
if not TYPE:
if os.path.isdir(f'{OGCAC}/{OGIMG}'):
subprocess.run(['mount', '--bind', f'{OGCAC}/{OGIMG}', OGIMG])
else:
subprocess.run(['mount', '-t', TYPE, 'LABEL=REPO', OGIMG], stderr=subprocess.DEVNULL)
else:
if subprocess.run(['smbclient', '-L', SERVER, '-N'], stderr=subprocess.DEVNULL).returncode == 0:
PASS = get_password()
subprocess.run(['mount.cifs', f'//{ROOTREPO}/ogimages', OGIMG, '-o', f'rw,serverino,acl,username=opengnsys,password={PASS}'])
if __name__ == "__main__":
mount_repo()

View File

@ -1,44 +0,0 @@
#!/usr/bin/env python3
import os
import subprocess
"""
@file otherservices.py
@brief Script de inicio para cargar otros servicios complementarios.
"""
# Lanzar servicios complementarios del cliente.
print(os.getenv('MSG_OTHERSERVICES', '.'))
# Iniciar rsyslog, si es necesario.
if not os.path.exists('/dev/log'):
subprocess.run(['service', 'rsyslog', 'start'])
# Adpatar la clave de "root" para acceso SSH.
with open('/scripts/ogfunctions', 'r') as file:
for line in file:
if 'OPTIONS=' in line:
pass_option = line.split('pass=')[1].split()[0]
break
else:
pass_option = 'og'
passwd = pass_option or 'og'
subprocess.run(['passwd', 'root'], input=f'{passwd}\n{passwd}\n', text=True)
# Cargar el entorno OpenGnsys en conexión SSH.
subprocess.run(['cp', '-a', f'{os.getenv("OPENGNSYS")}/etc/preinit/loadenviron.py', '/etc/profile.d/'])
# Arrancar SSH.
subprocess.run(['/etc/init.d/ssh', 'start'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
# Desactivado apagado de monitor.
# subprocess.run(['setterm', '-blank', '0', '-powersave', 'off', '-powerdown', '0'], stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
# Activado WOL en la interfaz usada en arranque PXE.
subprocess.run(['ethtool', '-s', os.getenv('DEVICE'), 'wol', 'g'], stderr=subprocess.DEVNULL)
# TODO Localizar correctamente el script de arranque.
if os.path.isfile('/opt/opengnsys/scripts/runhttplog.sh'):
subprocess.run(['/opt/opengnsys/scripts/runhttplog.sh'], stderr=subprocess.DEVNULL)

View File

@ -1,52 +0,0 @@
#!/usr/bin/env python3
import os
import subprocess
import sys
"""
@file poweroff.py
@brief Script de inicio para cargar el proceso comprobación de clientes inactivos.
@note Arranca y configura el proceso "cron".
"""
def main():
opengnsys = os.getenv('OPENGNSYS')
if opengnsys:
msg_poweroffconf = os.getenv('MSG_POWEROFFCONF', '.')
print(msg_poweroffconf)
ogntp = os.getenv('ogntp')
status = os.getenv('status')
# Sincronización horaria con servidor NTP.
if ogntp and status != "offline":
subprocess.run(['ntpdate', ogntp])
# Crear fichero de configuración por defecto (30 min. de espera).
poweroff_conf = '/etc/poweroff.conf'
with open(poweroff_conf, 'w') as f:
f.write("POWEROFFSLEEP=30\nPOWEROFFTIME=\n")
# Incluir zona horaria en el fichero de configuración.
with open('/proc/cmdline') as f:
cmdline = f.read()
tz = ' '.join([x for x in cmdline.split() if x.startswith('TZ=')])
with open(poweroff_conf, 'a') as f:
f.write(tz + '\n')
# Lanzar el proceso "cron".
subprocess.run(['cron', '-l'])
# Definir la "crontab" lanzando el proceso de comprobación cada minuto.
ogbin = os.getenv('OGBIN')
crontab_line = f"* * * * * [ -x {ogbin}/poweroffconf ] && {ogbin}/poweroffconf\n"
subprocess.run(['crontab', '-'], input=crontab_line, text=True)
else:
# FIXME Error: entorno de OpenGnsys no configurado.
print("Error: OpenGnsys environment is not configured.") # FIXME: definir mensaje.
sys.exit(1)
if __name__ == "__main__":
main()

View File

@ -1,121 +0,0 @@
#!/usr/bin/env python3
import os
import subprocess
import sys
import FileSystemLib
import DiskLib
os.environ["DEBUG"] = "no"
# Obtener el número de serie y configuración inicial
ser = subprocess.getoutput("ogGetSerialNumber")
cfg = ""
# Obtener el número de discos
disks = len(subprocess.getoutput("ogDiskToDev").split())
for dsk in disk_list:
# Número de particiones
particiones = FileSystemLib.ogGetPartitionsNumber(dsk) or "0"
particiones = int(particiones)
# Tipo de tabla de particiones
ptt = DiskLib.ogGetPartitionTableType(dsk)
ptt_mapping = {"MSDOS": 1, "GPT": 2, "LVM": 3, "ZPOOL": 4}
ptt = ptt_mapping.get(ptt, 0)
# Información de disco (partición 0)
disk_size = DiskLib.ogGetDiskSize(dsk)
cfg += f"{dsk}:0:{ptt}:::{disk_size}:0;"
# Recorrer particiones
for par in range(1, particiones + 1):
# Código del identificador de tipo de partición
cod = DiskLib.ogGetPartitionId(dsk, par)
# Tipo del sistema de ficheros
fsi = FileSystemLib.getFsType(dsk, par) or "EMPTY"
# Tamaño de la partición
tam = DiskLib.ogGetPartitionSize(dsk, par) or "0"
# Sistema operativo instalado
soi = ""
uso = 0
if fsi not in ["", "EMPTY", "LINUX-SWAP", "LINUX-LVM", "ZVOL"]:
mount_point = DiskLib.ogMount(dsk, par)
if mount_point:
# Obtener la versión del sistema operativo instalado
try:
# Asumiendo que getOsVersion es una función disponible
import OsLib # Debes tener OsLib.py disponible con la función getOsVersion
soi_output = OsLib.getOsVersion(dsk, par)
except ImportError:
# Si no está disponible, usar subprocess como alternativa
soi_output = subprocess.getoutput(f"getOsVersion {dsk} {par} 2>/dev/null")
soi = soi_output.split(':')[1] if ':' in soi_output else ''
# Hacer un segundo intento para algunos casos especiales
if not soi:
soi_output = subprocess.getoutput(f"getOsVersion {dsk} {par} 2>/dev/null")
soi = soi_output.split(':')[1] if ':' in soi_output else ''
# Sistema de archivos para datos (sistema operativo "DATA")
if not soi and fsi not in ["EMPTY", "CACHE"]:
soi = "DATA"
# Obtener porcentaje de uso
mount_point = DiskLib.ogGetMountPoint(dsk, par)
df_output = subprocess.getoutput(f"df {mount_point}")
lines = df_output.splitlines()
if len(lines) >= 2:
uso_str = lines[1].split()[4] # Esta debería ser la quinta columna
if uso_str.endswith('%'):
uso = int(uso_str.rstrip('%'))
else:
uso = int(uso_str)
else:
uso = 0
else:
soi = ""
uso = 0
else:
soi = ""
uso = 0
cfg += f"{dsk}:{par}:{cod}:{fsi}:{soi}:{tam}:{uso};"
# Configuración por defecto para cliente sin disco
if not cfg:
cfg = "1:0:0:::0;"
# Guardar salida en fichero temporal
cfgfile = "/tmp/getconfig"
with open(cfgfile, 'w') as f:
f.write(f"{ser + ';' if ser else ''}{cfg}")
# Crear el menú por defecto desde el archivo generado
subprocess.run(["generateMenuDefault"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
# Componer salida formateada
formatted_output = []
with open(cfgfile, 'r') as f:
content = f.read().strip().split(";")
for item in content:
fields = item.split(":")
if len(fields) == 1:
formatted_output.append(f"ser={fields[0]}")
else:
formatted_output.append(
f"disk={fields[0]}\tpar={fields[1]}\tcpt={fields[2]}\tfsi={fields[3]}\tsoi={fields[4]}\ttam={fields[5]}\tuso={fields[6]}"
)
# Mostrar la salida formateada
print("\n".join(formatted_output))
# Borrar marcas de arranque de Windows
subprocess.run(["rm", "-f", "/mnt/*/ogboot.*", "/mnt/*/*/ogboot.*"])
# Volver a registrar los errores
os.environ.pop("DEBUG", None)

6
debian/changelog vendored 100644
View File

@ -0,0 +1,6 @@
ogclient (0.1.0-1) stable; urgency=medium
* First debian package for the client files
-- OpenGnsys developers <info@opengnsys.es> Thu, 26 Feb 2025 13:22:29 +0100

1
debian/compat vendored 100644
View File

@ -0,0 +1 @@
10

16
debian/control vendored 100644
View File

@ -0,0 +1,16 @@
Source: ogclient
Section: admin
Priority: optional
Maintainer: OpenGnsys developers <info@opengnsys.es>
Build-Depends: debhelper (>= 7), po-debconf
Standards-Version: 3.9.2
Homepage: https://opengnsys.es/
Package: ogclient
Section: admin
Priority: optional
Architecture: all
Depends:
samba, ucf, python3 (>=3.4) | python (>= 3.4), ${misc:Depends}, ${shlibs:Depends}
Description: OpenGnsys client files
This package provides the basic filesystem for clients.

26
debian/copyright vendored 100644
View File

@ -0,0 +1,26 @@
Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
Name: ogclient
Maintainer: OpenGnsys developers
Source: https://opengnsys.es
Copyright: 2014 Virtual Cable S.L.U.
License: BSD-3-clause
License: GPL-2+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
.
On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file
`/usr/share/common-licenses/GPL-2'.

4
debian/ogclient.dirs vendored 100644
View File

@ -0,0 +1,4 @@
opt/opengnsys/ogclient_log
opt/opengnsys/ogclient/images
opt/opengnsys/ogclient/cache
opt/opengnsys/ogclient/log

2
debian/ogclient.install vendored 100644
View File

@ -0,0 +1,2 @@
ogclient opt/opengnsys/
etc/samba/smb-ogclient.conf etc/samba/

53
debian/ogclient.postinst vendored 100644
View File

@ -0,0 +1,53 @@
#!/bin/sh
set -e
case "$1" in
configure)
# Create a temporary file with the modified configuration
SMB_CONF="/etc/samba/smb-ogclient.conf"
OLD_FILE="/etc/samba/smb.conf"
NEW_FILE=$(mktemp)
# Ensure the template file exists
if [ ! -f "$SMB_CONF" ]; then
echo "Config file missing!"
exit 1
fi
# Check if our share section already exists
if grep -q "include = /etc/samba/smb-ogclient.conf" "$OLD_FILE"; then
# Section already exists, do nothing
rm -f "$NEW_FILE"
else
# Copy the original file
cp -a "$OLD_FILE" "$NEW_FILE"
# Append our configuration
echo "include = /etc/samba/smb-ogclient.conf" >> "$NEW_FILE"
# Use ucf to handle the file update
ucf --debconf-ok "$NEW_FILE" "$OLD_FILE"
# Clean up
rm -f "$NEW_FILE"
# Reload Samba
if command -v systemctl >/dev/null 2>&1; then
systemctl reload smbd.service
else
service smbd reload || true
fi
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0

26
debian/ogclient.postrm vendored 100644
View File

@ -0,0 +1,26 @@
#!/bin/sh -e
set -e
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
# Create a temporary file with the configuration without our share
OLD_FILE="/etc/samba/smb.conf"
NEW_FILE=$(mktemp)
# Remove our share section from the file
grep -v "include = /etc/samba/smb-ogclient.conf" "$OLD_FILE" > "$NEW_FILE"
# Use ucf to update the file
ucf --debconf-ok "$NEW_FILE" "$OLD_FILE"
ucf --purge "$OLD_FILE"
# Clean up
rm -f "$NEW_FILE"
# Reload Samba
if command -v systemctl >/dev/null 2>&1; then
systemctl reload smbd.service
else
service smbd reload || true
fi
fi

4
debian/rules vendored 100755
View File

@ -0,0 +1,4 @@
#!/usr/bin/make -f
%:
dh $@

1
debian/source/format vendored 100644
View File

@ -0,0 +1 @@
3.0 (native)

View File

@ -0,0 +1,15 @@
[ogclient]
comment = OpenGnsys Client
browseable = no
writeable = no
locking = no
path = /opt/opengnsys/ogclient
guest ok = no
[oglog]
comment = OpenGnsys Log
browseable = no
writeable = yes
locking = no
path = /opt/opengnsys/ogclient_log
guest ok = no

View File

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -0,0 +1,23 @@
OpenGnsys Client README
========================
Este directorio contiene la estructura principal de datos que será
importada por los clientes OpenGnsys mediante Samba.
Los subdirectorios se copian íntegramente al servidor bajo
/opt/opengnsys/client y serán importados por los clientes en
/opt/opengnsys.
La estructura de datos es la siguiente:
- bin scripts o binarios ejecutables por el cliente (compilados estáticamente).
- etc ficheros de configuración del cliente.
- interfaceAdm interface con el agente
- lib librerías de funciones.
- engine/bin ficheros con las funciones del motor de clonación.
- httpd ficheros de configuración del servicio lighttpd.
- modules módulos extra para el Kernel del cliente.
- qtlib librerías Qt complementarias del Browser.
- qtplugins plugins Qt para el Browser.
- scripts funciones de alto nivel ejecutables por OpenGnsys Browser
y OpenGnsys Admin.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,82 @@
#!/bin/bash
#/**
#@file poweroffconf
#@brief Control de parada tras tiempo de inactividad para ahorro de energía.
#@license GNU GPLv3+
#@param int_minutos Minutos de inactividad (opcional); "no" para deshabilitar..
#@note La comprobación periódica debe ejecutarse en el "cron" del sistema.
#@note Fichero de configuración: /etc/poweroff.conf
#@author Ramón Gómez - Univ. Sevilla
#@date 2011-10-25
#@version 1.0.5: incluir opción para deshabilitar ahorro de energía.
#@author Ramón Gómez - Univ. Sevilla
#@date 2014-02-07
#@version 1.1.1: Corregir problema al cambiar de día
#@author Ramón Gómez - Univ. Sevilla
#@date 2018-07-04
#*/
# Variables generales.
OPENGNSYS=${OPENGNSYS:-/opt/opengnsys} # Instalación de OpenGnsys
OGETC=${OGETC:-$OPENGNSYS/etc} # Configuración de OpenGnsys
POWEROFFCONF=/etc/poweroff.conf # Configuración del script
# Error si no existe el fichero de configuración de ahorro de energía.
if [ ! -f $POWEROFFCONF ]; then
ogRaiseError $OG_ERR_NOTFOUND "$POWEROFFCONF"
exit $?
fi
# Obtener parámetros de configuración de ahorro de energía.
source $POWEROFFCONF
export TZ
case $# in
0) # Sin parámetros, comprobar que existe la variable POWEROFFSLEEP.
if [ -z "$POWEROFFSLEEP" ]; then
ogRaiseError $OG_ERR_FORMAT "Sin tiempo de espera."
exit $?
fi
;;
1) # Nuevo timepo de espera.
POWEROFFSLEEP="$1"
# Se deshabilita si se introduce la cadena "no" como tiempo de espera.
[ "$POWEROFFSLEEP" == "no" ] && POWEROFFSLEEP=
# Error si tiempo de espera no es nulo o entero positivo.
if [[ ! "$POWEROFFSLEEP" =~ ^[0-9]*$ ]]; then
ogRaiseError $OG_ERR_FORMAT "Parámetro debe ser núm. minutos o \"no\" para deshabilitar."
exit $?
fi
# Actualizar fichero de configuración con nuevo periodo de parada.
perl -pi -e "s/POWEROFFSLEEP=.*/POWEROFFSLEEP=$POWEROFFSLEEP/" $POWEROFFCONF
# Si se necesita, recalcular tiempo de parada.
if [ -n "POWEROFFTIME" ]; then
# Asignar tiempo de apagado si no está deshabilitado y actualizar fichero.
POWEROFFTIME=${POWEROFFSLEEP:+$(date --date="$POWEROFFSLEEP min" +"%s")}
perl -pi -e "s/POWEROFFTIME=.*/POWEROFFTIME=$POWEROFFTIME/" $POWEROFFCONF
fi
exit 0 ;;
*) # Error de formato de ejecución.
ogRaiseError $OG_ERR_FORMAT "Formato: $0 [int_minutos | no]"
exit $? ;;
esac
# Comprobar si hay algún script en ejecución (verificando compatibilidad de "pgrep").
[ -n "$(pgrep -fa 2>&1 | grep "invalid")" ] && PGREP="pgrep -fl" || PGREP="pgrep -fa"
if [ -n "$($PGREP $OPENGNSYS | egrep -v "$OGETC|$0")" ]; then
# Eliminar tiempo de inicio de espera, si se está ejecutando operación.
perl -pi -e 's/POWEROFFTIME=.*$/POWEROFFTIME=/' $POWEROFFCONF
else
# Si el sistema está en estado de espera, ...
NOW=$(date +"%s")
if [ -z "$POWEROFFTIME" ]; then
# Asignar tiempo de inicio, si no estaba definido.
POWEROFFTIME=$(date --date="$POWEROFFSLEEP min" +"%s")
perl -pi -e "s/POWEROFFTIME=.*$/POWEROFFTIME=$POWEROFFTIME/" $POWEROFFCONF
else
# Apagar el equipo si se sobrepasa el periodo de espera.
if [ $NOW -ge $POWEROFFTIME ]; then
$OPENGNSYS/scripts/poweroff
fi
fi
fi

Binary file not shown.

View File

@ -0,0 +1,246 @@
#!/usr/bin/env python
from __future__ import print_function
import os
import subprocess
import doctest
import re
FIRST_SCRIPT = 'prepare'
LAST_SCRIPT = 'cleanup'
PRE_EXTENSION = '.pre'
POST_EXTENSION = '.post'
PYTHON_TEST_EXTENSION = '.pytest'
BASH_TEST_EXTENSION = '.shtest'
class RunTest:
'''Runs the tests'''
def __init__(self):
self.path = os.path.abspath('.')
# Only no-hide files
self.all_files = [filename for filename in os.listdir(self.path)
if filename[0] != '.' and os.path.isfile(filename)]
self.all_files = sorted(self.all_files)
self.python_tests = []
self.bash_tests = []
self.script_tests = []
self.first_script = ''
self.last_script = ''
self.pre_scripts = []
self.post_scripts = []
for filename in self.all_files:
if filename.endswith(PYTHON_TEST_EXTENSION):
self.python_tests.append(filename)
elif filename.endswith(BASH_TEST_EXTENSION):
self.bash_tests.append(filename)
elif os.access(filename, os.X_OK):
basename, extension = os.path.splitext(filename)
if basename == FIRST_SCRIPT:
if self.first_script:
raise MoreThanOneFirstScript()
self.first_script = filename
elif basename == LAST_SCRIPT:
if self.last_script:
raise MoreThanOneLastScript()
self.last_script = filename
elif extension == PRE_EXTENSION:
self.pre_scripts.append(filename)
elif extension == POST_EXTENSION:
self.post_scripts.append(filename)
else:
self.script_tests.append(filename)
self.fails = 0
def run_script(self, script):
'''Run a script test'''
path_script = os.path.join(self.path, script)
proc = subprocess.Popen((path_script), shell=True, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
return_value = proc.wait()
if return_value != 0:
self.fails += 1
stdout, stderr = proc.communicate()
print("*******************************************************")
print("Error %d in %s:" % (return_value, script))
print(stdout.decode(), end='')
print(stderr.decode(), end='')
return return_value
def run_bash_test(self, script):
'''Run bash test'''
#import pdb; pdb.set_trace()
path_script = os.path.join(self.path, script)
errors = 0
test_no = 0
for command, result, line in read_bash_tests(path_script):
test_no += 1
try:
proc = subprocess.Popen(('/bin/bash', '-c', command),
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
stdout = proc.communicate()[0]
except OSError as exc:
print('File "%s" line %d:' % (script, line))
print('Failed example:')
print(' ' + command)
print("Exception was raised:")
print(" ", end="")
print(exc)
print("*******************************************************")
errors += 1
else:
if result != stdout.decode():
print('File "%s" line %d:' % (script, line))
print('Failed example:')
print(' ' + command)
print("Expected:")
for l in result.split('\n')[:-1]:
print(' ' + l)
print("Got:")
for l in stdout.decode().split('\n')[:-1]:
print(' ' + l)
errors += 1
print("*******************************************************")
if errors != 0:
print("%d items had failures:" % errors)
print(" %d of %d in %s" % (errors, test_no, script))
print("***Test failed***")
else:
print("%3d tests PASSED in %s" % (test_no, script))
return errors
def run_pre_test(self, test):
'''Run the pre-test of a test'''
pre_test = test + PRE_EXTENSION
return_value = 0
if pre_test in self.pre_scripts:
return_value = self.run_script(pre_test)
if return_value:
print("No running: %s %s" % (test, test + POST_EXTENSION))
return return_value
def run_post_test(self, test):
'''Run the post-test of a test'''
post_test = test + POST_EXTENSION
if post_test in self.post_scripts:
return self.run_script(post_test)
def run_tests(self):
'''Run the tests in the correct order'''
if self.first_script:
if self.run_script(self.first_script) != 0:
print('*Error in prepare script. Aborting.*')
return self.show_errors()
all_tests = sorted(self.script_tests + self.python_tests + self.bash_tests)
for test in all_tests:
if self.run_pre_test(test) != 0:
continue
if test in self.script_tests:
self.run_script(test)
elif test in self.bash_tests:
fails = self.run_bash_test(test)
self.fails += fails
elif test in self.python_tests:
fails, n_tests = doctest.testfile(test, module_relative=False)
self.fails += fails
self.run_post_test(test)
if self.last_script:
self.run_script(self.last_script)
return self.show_errors()
def show_errors(self):
'''Show the total errors'''
if self.fails:
print("*******************************************************")
print("Total errors: %d" % self.fails)
return self.fails
class MoreThanOneFirstScript(Exception):
def __init__(self):
super(MoreThanOneFirstScript, self).__init__(
"More than one %s script" % FIRST_SCRIPT)
class MoreThanOneLastScript(Exception):
def __init__(self):
super(MoreThanOneLastScript, self).__init__(
"More than one %s script" % LAST_SCRIPT)
def read_bash_tests(file_name):
'''Iterator that yields the found tests'''
fd = open(file_name)
command = ''
result = ''
tests = []
line_no = 0
command_line = 0
command_re = re.compile("^\$ (.*)\n")
for line in fd.readlines():
line_no += 1
match = command_re.match(line)
if match:
# Is it a command?
if command:
# If it is a command but we have a previous command to send
yield (command, result, command_line)
result = ''
command = match.group(1)
command_line = line_no
elif command:
# If not a command but we have a previous command
if line != "\n":
# It's a part of the result
if line == "<BLANKLINE>\n":
result += '\n'
else:
result += line
else:
# Or it's the end of the result, yielding
yield (command, result, command_line)
command = ''
result = ''
else:
# This line is a comment
pass
if command:
# Cheking if the last command was sent
yield (command, result, command_line)
fd.close()
if __name__ == "__main__":
r = RunTest()
r.run_tests()

View File

@ -0,0 +1,56 @@
## Definicion general
set -a
OGENGINECONFIGURATE="TRUE"
OGLOGSESSION="/tmp/session.log"
OGLOGCOMMAND="/tmp/command.log"
##Configuracion de la PostConfiguracion OS WIndows
#Hacer chkdisk tras la clonacion
OGWINCHKDISK=TRUE
#Configuracion de interface restauracion
#Que hacer cuando la cache no tenga espacio libre. [ NONE | FORMAT ] ]
ACTIONCACHEFULL=NONE
#Que protocolo de restauracion usar en el caso de que no exista cache o no exista espacio sufiente. [NONE | UNICAST | MULTICAST].NONE retorna error
RESTOREPROTOCOLNOTCACHE=NONE
#script Creacion imagen
IMGPROG="partclone"
IMGCOMP="lzop"
IMGEXT="img"
IMGREDUCE="TRUE"
#Configuracion del asistente de Clonacion remota usando master
#Al enviar particion reducir el sistema de archivos previamente.
OGWINREDUCE=TRUE
# Sesion MULTICAST de cliente
#timeout (segundos) para abortar la sesion de multicast si no contacta con el servidor de multicast. Valor asignado a 0, utiliza los valores por defecto de udp-cast
MCASTERRORSESSION=120
# timeout (segundos) para abortar la la transferencia si se interrumpe. Valor asignado a 0, utiliza los valores por defecto de udp-cast
MCASTWAIT=30
# Imagenes sincronizadas
# Factor para calcular el time-out al crear la imagen. 100000k -> 4s
CREATESPEED=100000*4
# Factor de compresion para las imagenes (windos en ext4).
FACTORSYNC=120
# Realizar copia de seguridad antes de crear la imagen.
BACKUP=false
# Sistema de archivo de la imagenes sincronizadas. EXT4 o BTRFS
IMGFS=EXT4
# Tiempo de sleep antes de realizar el reboot
OGSLEEP="4"
# La variable INSTALLOSCLIENT no se utiliza en OpenGnsys 1.1.0.
# Funciones que no deben mostrar salida de avisos si son llamadas por otras funciones.
NODEBUGFUNCTIONS="ogCreateImageSyntax ogGetHivePath ogGetOsType ogRestoreImageSyntax ogUnmountAll ogUnmountCache"
# Velocidad de comunicación por defecto (muestra aviso en Browser si no se cumple):
# "", no usar esta característica.
# "100Mb/s", Fast Ethernet.
# "1000Mb/s", Gigabit Ethernet.
DEFAULTSPEED=""

View File

@ -0,0 +1,804 @@
{
"variables": [
{
"description": "applying engine configuration (boolean)",
"name": "OGENGINECONFIGURATE",
"value": true
},
{
"description": "session log file (path)",
"name": "OGLOGSESSION",
"value": "/tmp/session.log"
},
{
"description": "command log file (path)",
"name": "OGLOGCOMMAND",
"value": "/tmp/command.log"
},
{
"description": "image clonation program (string)",
"name": "IMGPROG",
"value": "partclone"
},
{
"description": "image compresson (string)",
"name": "IMGCOMP",
"value": "lzop"
},
{
"description": "filesystem image extension (string)",
"name": "IMGEXT",
"value": "img"
},
{
"description": "disk image extension (string)",
"name": "DISKIMGEXT",
"value": "dsk"
},
{
"description": "trying to reduce image (boolean)",
"name": "IMGREDUCE",
"value": true
},
{
"description": "trying to reduce Windows filesystem before creating image (boolean)",
"name": "OGWINREDUCE",
"value": true
},
{
"description": "time to sleep before reboot (seconds)",
"name": "OGSLEEP",
"value": 20
},
{
"description": "do not show warnings in this functions (list of functions)",
"name": "NODEBUGFUNCTIONS",
"value": "ogCreateImageSyntax ogGetHivePath ogGetOsType ogRestoreImageSyntax ogUnmountAll ogUnmountCache"
},
{
"description": "action to take if cache is full (NONE; FORMAT)",
"name": "ACTIONCACHEFULL",
"value": "NONE"
},
{
"description": "restoration protocol if cache is full or it does not exists (NONE, returns error; UNICAST; MULTICAST)",
"name": "RESTOREPROTOCOLNOTCACHE",
"value": "UNICAST"
},
{
"description": "timout if Multicast transfer does not begins (seconds)",
"name": "MCASTERRORSESSION",
"value": 120
},
{
"description": "timout if Multicast transfer does it's interrupted (seconds)",
"name": "MCASTWAIT",
"value": 30
},
{
"description": "run CHKDSK after Windows depolying (boolean)",
"name": "OGWINCHKDISK",
"value": true
},
{
"description": "timeout factor creating synchronized image (integer, 100000k => 4s)",
"name": "CREATESPEED",
"value": 400000
},
{
"description": "compression factor creating synchronized image (integer)",
"name": "FACTORSYNC",
"value": 120
},
{
"description": "make backup before creating synchronized image (boolean)",
"name": "BACKUP",
"value": false
},
{
"description": "filesystem type creating synchronized image (string)",
"name": "IMGFS",
"value": "EXT4"
},
{
"description": "default communication speed (blank, do not use; 100Mb/s; 1000Mb/s)",
"name": "DEFAULTSPEED",
"value": ""
}
],
"errors": [
{
"id": 1,
"description": "format error",
"name": "OG_ERR_FORMAT"
},
{
"id": 2,
"description": "resource not found",
"name": "OG_ERR_NOTFOUND"
},
{
"id": 3,
"description": "partition error",
"name": "OG_ERR_PARTITION"
},
{
"id": 4,
"description": "resource locked",
"name": "OG_ERR_LOCKED"
},
{
"id": 5,
"description": "image error",
"name": "OG_ERR_IMAGE"
},
{
"id": 6,
"description": "operating system not detected",
"name": "OG_ERR_NOTOS"
},
{
"id": 7,
"description": "program or function not executable",
"name": "OG_ERR_NOTEXEC"
},
{
"id": 14,
"description": "cannot write",
"name": "OG_ERR_NOTWRITE"
},
{
"id": 15,
"description": "cache filesystem does not exists",
"name": "OG_ERR_NOTCACHE"
},
{
"id": 16,
"description": "cache filesystem is full",
"name": "OG_ERR_CACHESIZE"
},
{
"id": 17,
"description": "error reducing filesystem",
"name": "OG_ERR_REDUCEFS"
},
{
"id": 18,
"description": "error extending filesystem",
"name": "OG_ERR_EXTENDFS"
},
{
"id": 19,
"description": "value out of limit",
"name": "OG_ERR_OUTOFLIMIT"
},
{
"id": 20,
"description": "filesystem error",
"name": "OG_ERR_FILESYS"
},
{
"id": 21,
"description": "cache error",
"name": "OG_ERR_CACHE"
},
{
"id": 22,
"description": "no GPT partition table",
"name": "OG_ERR_NOGPT"
},
{
"id": 23,
"description": "cannot mount repository",
"name": "OG_ERR_REPO"
},
{
"id": 30,
"description": "trying to restore an image into an smaller partition",
"name": "OG_ERR_IMGSIZEPARTITION"
},
{
"id": 31,
"description": "error updating cache",
"name": "OG_ERR_UPDATECACHE"
},
{
"id": 32,
"description": "formatting error",
"name": "OG_ERR_DONTFORMAT"
},
{
"id": 40,
"description": "unknown error",
"name": "OG_ERR_GENERIC"
},
{
"id": 50,
"description": "error preparing Unicast syntax",
"name": "OG_ERR_UCASTSYNTAXT"
},
{
"id": 51,
"description": "error sending partition using Unicast protocol",
"name": "OG_ERR_UCASTSENDPARTITION"
},
{
"id": 52,
"description": "error sending file using Unicast protocol",
"name": "OG_ERR_UCASTSENDFILE"
},
{
"id": 52,
"description": "error receiving partition using Unicast protocol",
"name": "OG_ERR_UCASTRECEIVERPARTITION"
},
{
"id": 53,
"description": "error receiving file using Unicast protocol",
"name": "OG_ERR_UCASTRECEIVERFILE"
},
{
"id": 55,
"description": "error preparing Multicast syntax",
"name": "OG_ERR_MCASTSYNTAXT"
},
{
"id": 56,
"description": "error sending file using Multicast protocol",
"name": "OG_ERR_MCASTSENDFILE"
},
{
"id": 57,
"description": "error receiving file using Multicast protocol",
"name": "OG_ERR_MCASTRECEIVERFILE"
},
{
"id": 58,
"description": "error sending partition using Multicast protocol",
"name": "OG_ERR_MCASTSENDPARTITION"
},
{
"id": 59,
"description": "error receiving partition using Multicast protocol",
"name": "OG_ERR_MCASTRECEIVERPARTITION"
},
{
"id": 60,
"description": "error connecting master node",
"name": "OG_ERR_PROTOCOLJOINMASTER"
},
{
"id": 70,
"description": "cannot mount a syncrhronized image",
"name": "OG_ERR_DONTMOUNT_IMAGE"
},
{
"id": 71,
"description": "it's not a syncrhronized image",
"name": "OG_ERR_DONTSYNC_IMAGE"
},
{
"id": 72,
"description": "cannot unmount a syncrhronized image",
"name": "OG_ERR_DONTUNMOUNT_IMAGE"
},
{
"id": 73,
"description": "there are no differences between basic image and filesystem",
"name": "OG_ERR_NOTDIFFERENT"
},
{
"id": 74,
"description": "synchronization error",
"name": "OG_ERR_SYNCHRONIZING"
}
],
"disks": [
{
"type": "DISK"
},
{
"type": "USB"
},
{
"type": "CDROM"
},
{
"type": "RAID"
},
{
"type": "MAPPER"
}
],
"partitiontables": [
{
"id": 1,
"type": "MSDOS",
"partitions": [
{
"id": "0",
"type": "EMPTY",
"clonable": false
},
{
"id": "1",
"type": "FAT12",
"clonable": true
},
{
"id": "5",
"type": "EXTENDED",
"clonable": false
},
{
"id": "6",
"type": "FAT16",
"clonable": true
},
{
"id": "7",
"type": "NTFS",
"clonable": true
},
{
"id": "b",
"type": "FAT32",
"clonable": true
},
{
"id": "11",
"type": "HFAT12",
"clonable": true
},
{
"id": "16",
"type": "HFAT16",
"clonable": true
},
{
"id": "17",
"type": "HNTFS",
"clonable": true
},
{
"id": "1b",
"type": "HFAT32",
"clonable": true
},
{
"id": "27",
"type": "HNTFS-WINRE",
"clonable": true
},
{
"id": "82",
"type": "LINUX-SWAP",
"clonable": false
},
{
"id": "83",
"type": "LINUX",
"clonable": true
},
{
"id": "8e",
"type": "LINUX-LVM",
"clonable": true
},
{
"id": "a5",
"type": "FREEBSD",
"clonable": true
},
{
"id": "a6",
"type": "OPENBSD",
"clonable": true
},
{
"id": "a9",
"type": "NETBSD",
"clonable": true
},
{
"id": "af",
"type": "HFS",
"clonable": true
},
{
"id": "be",
"type": "SOLARIS-BOOT",
"clonable": true
},
{
"id": "bf",
"type": "SOLARIS",
"clonable": true
},
{
"id": "ca",
"type": "CACHE",
"clonable": false
},
{
"id": "da",
"type": "DATA",
"clonable": true
},
{
"id": "ee",
"type": "GPT",
"clonable": false
},
{
"id": "ef",
"type": "EFI",
"clonable": true
},
{
"id": "fb",
"type": "VMFS",
"clonable": true
},
{
"id": "fd",
"type": "LINUX-RAID",
"clonable": true
}
]
},
{
"id": 2,
"type": "GPT",
"partitions": [
{
"id": "700",
"type": "WINDOWS",
"clonable": true
},
{
"id": "c01",
"type": "WIN-RESERV",
"clonable": true
},
{
"id": "2700",
"type": "WIN-RECOV",
"clonable": true
},
{
"id": "7f00",
"type": "CHROMEOS-KRN",
"clonable": true
},
{
"id": "7f01",
"type": "CHROMEOS",
"clonable": true
},
{
"id": "7f02",
"type": "CHROMEOS-RESERV",
"clonable": true
},
{
"id": "8200",
"type": "LINUX-SWAP",
"clonable": false
},
{
"id": "8300",
"type": "LINUX",
"clonable": true
},
{
"id": "8301",
"type": "LINUX-RESERV",
"clonable": true
},
{
"id": "8302",
"type": "LINUX",
"clonable": true
},
{
"id": "8e00",
"type": "LINUX-LVM",
"clonable": true
},
{
"id": "a500",
"type": "FREEBSD-DISK",
"clonable": false
},
{
"id": "a501",
"type": "FREEBSD-BOOT",
"clonable": true
},
{
"id": "a502",
"type": "FREEBSD-SWAP",
"clonable": false
},
{
"id": "a503",
"type": "FREEBSD",
"clonable": true
},
{
"id": "a504",
"type": "FREEBSD",
"clonable": true
},
{
"id": "a901",
"type": "NETBSD-SWAP",
"clonable": false
},
{
"id": "a902",
"type": "NETBSD",
"clonable": true
},
{
"id": "a903",
"type": "NETBSD",
"clonable": true
},
{
"id": "a904",
"type": "NETBSD",
"clonable": true
},
{
"id": "a905",
"type": "NETBSD",
"clonable": true
},
{
"id": "a906",
"type": "NETBSD-RAID",
"clonable": true
},
{
"id": "ab00",
"type": "HFS-BOOT",
"clonable": true
},
{
"id": "af00",
"type": "HFS",
"clonable": true
},
{
"id": "af01",
"type": "HFS-RAID",
"clonable": true
},
{
"id": "af02",
"type": "HFS-RAID",
"clonable": true
},
{
"id": "be00",
"type": "SOLARIS-BOOT",
"clonable": true
},
{
"id": "bf00",
"type": "SOLARIS",
"clonable": true
},
{
"id": "bf01",
"type": "SOLARIS",
"clonable": true
},
{
"id": "bf02",
"type": "SOLARIS-SWAP",
"clonable": false
},
{
"id": "bf03",
"type": "SOLARIS-DISK",
"clonable": true
},
{
"id": "bf04",
"type": "SOLARIS",
"clonable": true
},
{
"id": "bf05",
"type": "SOLARIS",
"clonable": true
},
{
"id": "ca00",
"type": "CACHE",
"clonable": false
},
{
"id": "ef00",
"type": "EFI",
"clonable": true
},
{
"id": "ef01",
"type": "MBR",
"clonable": false
},
{
"id": "ef02",
"type": "BIOS-BOOT",
"clonable": false
},
{
"id": "fb00",
"type": "VMFS",
"clonable": true
},
{
"id": "fb01",
"type": "VMFS-RESERV",
"clonable": true
},
{
"id": "fb02",
"type": "VMFS-KRN",
"clonable": true
},
{
"id": "fd00",
"type": "LINUX-RAID",
"clonable": true
},
{
"id": "ffff",
"type": "UNKNOWN",
"clonable": true
}
]
},
{
"id": 3,
"type": "LVM",
"partitions": [
{
"id": "10000",
"type": "LVM-LV",
"clonable": true
}
]
},
{
"id": 4,
"type": "ZPOOL",
"partitions": [
{
"id": "10010",
"type": "ZFS-VOL",
"clonable": true
}
]
}
],
"filesystems": [
{
"id": 1,
"type": "EMPTY"
},
{
"id": 2,
"type": "CACHE"
},
{
"id": 3,
"type": "BTRFS"
},
{
"id": 4,
"type": "EXT2"
},
{
"id": 5,
"type": "EXT3"
},
{
"id": 6,
"type": "EXT4"
},
{
"id": 7,
"type": "FAT12"
},
{
"id": 8,
"type": "FAT16"
},
{
"id": 9,
"type": "FAT32"
},
{
"id": 10,
"type": "HFS"
},
{
"id": 11,
"type": "HFSPLUS"
},
{
"id": 12,
"type": "JFS"
},
{
"id": 13,
"type": "NTFS"
},
{
"id": 14,
"type": "REISERFS"
},
{
"id": 15,
"type": "REISER4"
},
{
"id": 16,
"type": "UFS"
},
{
"id": 17,
"type": "XFS"
},
{
"id": 18,
"type": "LINUX-SWAP"
},
{
"id": 19,
"type": "EXFAT"
},
{
"id": 20,
"type": "F2FS"
},
{
"id": 21,
"type": "NILFS2"
}
],
"operatingsystems": [
{
"type": "Android"
},
{
"type": "BSD"
},
{
"type": "GrubLoader"
},
{
"type": "Hurd"
},
{
"type": "Linux"
},
{
"type": "MacOS"
},
{
"type": "Solaris"
},
{
"type": "Windows"
},
{
"type": "WinLoader"
}
]
}

Binary file not shown.

View File

@ -0,0 +1,40 @@
#!/bin/bash
# Proceso general de arranque de OpenGnsys Client.
# Fichero de registro de incidencias (en el servidor; si no, en local).
OPENGNSYS=${OPENGNSYS:-/opt/opengnsys}
OGLOGFILE=${OGLOGFILE:-$OPENGNSYS/log/$(ogGetIpAdderss).log}
if ! touch $OGLOGFILE 2>/dev/null; then
OGLOGFILE=/var/log/opengnsys.log
fi
LOGLEVEL=5
# Matando plymount para inicir browser o shell
pkill -9 plymouthd
# Arranque de OpenGnsys Client daemon (socket).
echo "${MSG_LAUNCHCLIENT:-.}"
# Indicar fichero de teclado de Qt para el idioma especificado (tipo "es.qmap").
[ -f /usr/local/etc/${LANG%_*}.qmap ] && export QWS_KEYBOARD="TTY:keymap=/usr/local/etc/${LANG%_*}.qmap"
if [ -f "/usr/share/OGAgent/opengnsys/linux/OGAgentService.py" -a "$ogstatus" != "offline" ]; then
# Ejecutar servicio cliente.
cd /usr/share/OGAgent
export OGAGENTCFG_OGCORE_IP=$ogcore
export OGAGENTCFG_OGLOG_IP=$oglog
export OGAGENTCFG_URLMENU_IP=$ogcore
python3 -m opengnsys.linux.OGAgentService fg
else
for FILE in index $OGGROUP $(ogGetIpAddress)
do
[ -f $OGCAC/menus/$FILE.html ] && OGMENU="$OGCAC/menus/$FILE.html"
done
echo "exec /usr/bin/OGBrowser $OGMENU" > /home/root/
/usr/bin/OGBrowser -qws $OGMENU
fi
# Si fallo en cliente y modo "admin", cargar shell; si no, salir.
if [ "$ogactiveadmin" == "true" ]; then
bash
fi

View File

@ -0,0 +1 @@
lang.ca_ES.conf

View File

@ -0,0 +1,398 @@
# Fichero de idioma: catalá.
#@version 1.1.1
#@author
# Mensajes de error.
MSG_ERR_GENERIC="Error imprevisto no definido"
MSG_ERR_FORMAT="Formato de ejecución incorrecto"
MSG_ERR_OUTOFLIMIT="Valor fuera de rango o no válido"
MSG_ERR_NOTFOUND="Fichero o dispositivo no encontrado"
MSG_ERR_PARTITION="Partición errónea o desconocida"
MSG_ERR_LOCKED="Recurso bloqueado por operación de uso exclusivo"
MSG_ERR_CACHE="Error en partición de caché local"
MSG_ERR_NOGPT="El disco indicado no contiene una particion GPT"
MSG_ERR_REPO="Error al montar el repositorio de imágenes"
MSG_ERR_NOMSDOS="El disco indicado no contiene una partición MSDOS"
MSG_ERR_FILESYS="Sistema de archivos desconocido o no se puede montar"
MSG_ERR_NOTOS="Sistema operativo no detectado o no se puede iniciar"
MSG_ERR_IMAGE="No se puede crear o restaurar una image de sistema"
MSG_ERR_IMAGEFILE="Archivo de imagen corrupto o de otra versión de partclone"
MSG_ERR_NOTEXEC="Programa o función no ejecutable"
MSG_ERR_NOTWRITE="No hay acceso de escritura"
MSG_ERR_NOTCACHE="No existe particion Cache en el cliente"
MSG_ERR_NOTUEFI="La interfaz UEFI no está activa"
MSG_ERR_NOTBIOS="La interfaz BIOS Legacy no está activa"
MSG_ERR_CACHESIZE="El espacio de la cache local o remota no es suficiente"
MSG_ERR_REDUCEFS="Error al reducir el sistema de archivos"
MSG_ERR_EXTENDFS="Error al expandir el sistema de archivos"
MSG_ERR_IMGSIZEPARTITION="Error al restaurar: Particion mas pequeña que la imagen"
MSG_ERR_UPDATECACHE="Error al realizar el comando updateCache"
MSG_ERR_UCASTSYNTAXT="Error en la generación de sintaxis de transferenica unicast"
MSG_ERR_UCASTSENDPARTITION="Error en envio UNICAST de una particion"
MSG_ERR_UCASTSENDFILE="Error en envio UNICAST de un fichero"
MSG_ERR_UCASTRECEIVERPARTITION="Error en la recepcion UNICAST de una particion"
MSG_ERR_UCASTRECEIVERFILE="Error en la recepcion UNICAST de un fichero"
MSG_ERR_MCASTSYNTAXT="Error en la generación de sintaxis de transferenica multicast"
MSG_ERR_MCASTSENDFILE="Error en envio MULTICAST de un fichero"
MSG_ERR_MCASTRECEIVERFILE="Error en la recepcion MULTICAST de un fichero"
MSG_ERR_MCASTSENDPARTITION="Error en envio MULTICAST de una particion"
MSG_ERR_MCASTRECEIVERPARTITION="Error en la recepcion MULTICAST de un fichero"
MSG_ERR_PROTOCOLJOINMASTER="Error en la conexion de una sesion UNICAST|MULTICAST con el MASTER"
MSG_ERR_DONTFORMAT="Error al formatear"
MSG_ERR_DONTMOUNT_IMAGE="Error al montar/reducir la imagen"
MSG_ERR_DONTUNMOUNT_IMAGE="Error al desmontar la imagen"
MSG_ERR_DONTSYNC_IMAGE="Imagen no sincronizable"
MSG_ERR_NOTDIFFERENT="No se detectan diferencias entre la imagen basica y la particion."
MSG_ERR_SYNCHRONIZING="Error al sincronizar, puede afectar la creacion|restauracion de la imagen"
# Mensajes de avisos.
MSG_DONTUSE="NO USAR"
MSG_DONTMOUNT="Sistema de archivos no montado"
MSG_DONTUNMOUNT="El sistema de archivos no se puede desmontar o no está montado"
MSG_MOUNT="Sistema de archivos montado"
MSG_MOUNTREADONLY="Sistema de archivos montado solo de lectura"
MSG_OBSOLETE="EN DESUSO"
# Mensajes complementarios para las ayudas.
MSG_64BIT="64 bits"
MSG_DISK="disc"
MSG_ERROR="Error"
MSG_EXAMPLE="Exemple"
MSG_FORMAT="Format"
MSG_FUNCTION="Funció"
MSG_HARDWAREINVENTORY="Inventario de maquinari de la màquina"
MSG_IMAGE="imatge"
MSG_INSTALLED="instal-lat"
MSG_NOCACHE="sense caché local"
MSG_NOEXTENDED="sense partició estensa"
MSG_PARTITION="partició"
MSG_PROTOCOL="protocol"
MSG_RESERVEDVALUE="Valor reservat"
MSG_SEE="Veure"
MSG_UNKNOWN="Desconegut"
MSG_WARNING="Avís"
# Mensajes del proceso de arranque.
MSG_DETECTLVMRAID="Detectar metadispositivos LVM y RAID."
MSG_ERRBOOTMODE="$MSG_ERROR: Modo de arranque desconocido."
MSG_LAUNCHCLIENT="Ejecutar cliente."
MSG_LOADAPI="Cargar funciones del motor de clonación."
MSG_LOADMODULES="Cargar módulos del kernel."
MSG_MAKELINKS="Crear enlaces simbólicos."
MSG_MOUNTREPO="Montar repositorio por %s en modo %s."
MSG_OFFLINEMODE="Modo de arranque sin conexión."
MSG_OTHERSERVICES="Iniciar servicios complementarios del cliente."
MSG_POWEROFFCONF="Definir parámetros de ahorro de energía."
# Mensajes del menú por defecto.
MSG_BOOT="Iniciar"
MSG_DUPLEX="D&uacute;plex"
MSG_HOSTNAME="Equipo"
MSG_IPADDR="Direcci&oacute;n IP"
MSG_MACADDR="Direcci&oacute;n MAC"
MSG_MENUTITLE="Men&uacute; de opciones"
MSG_POWEROFF="Apagar el equipo"
MSG_SPEED="Velocidad"
# Mensajes de descripción breve de las funciones de la API.
MSG_HELP_ogAclFilter="Extrae las acl de los ficheros de la diferencial"
MSG_HELP_ogAddCmd="Añade comandos al fichero creado por la función ogInstalMiniSetup."
MSG_HELP_ogAddRegistryKey="Añade una nueva clave al registro de Windows."
MSG_HELP_ogAddRegistryValue="Añade un nuevo valor al registro de Windows."
MSG_HELP_ogAddToLaunchDaemon=""
MSG_HELP_ogBoot="Arranca un sistema operativo instalado."
MSG_HELP_ogBootLoaderDeleteEntry="$MSG_DONTUSE."
MSG_HELP_ogBootLoaderHidePartitions="$MSG_DONTUSE."
MSG_HELP_ogBootMbrGeneric=""
MSG_HELP_ogBootMbrXP=""
MSG_HELP_ogBurgDefaultEntry="Configura la entrada por defecto de Burg."
MSG_HELP_ogBurgDeleteEntry="Borra en el Burg del MBR las entradas para el inicio en una particion."
MSG_HELP_ogBurgHidePartitions="Configura el Burg del MBR para que oculte las particiones de windows que no se esten iniciando. Permite definir una partición que no se ocultará (ej: para datos)."
MSG_HELP_ogBurgInstallMbr="Instal·la el carregador d'arrencada BURG al MBR del primer disc dur"
MSG_HELP_ogBurgOgliveDefaultEntry="Configura la entrada de ogLive como la entrada por defecto de Burg."
MSG_HELP_ogCalculateChecksum="Calcula la suma de comprobación (checksum) de un fichero."
MSG_HELP_ogCalculateFullChecksum=""
MSG_HELP_ogChangeRepo="Cambia el repositorio para el recurso remoto images."
MSG_HELP_ogCheckFs="Comprueba la consistencia de un sistema de archivos."
MSG_HELP_ogCheckIpAddress=""
MSG_HELP_ogCheckProgram=""
MSG_HELP_ogCheckStringInGroup=""
MSG_HELP_ogCheckStringInReg=""
MSG_HELP_ogCheckSyncImage="Muestra el contenido de la imagen para comprobarla."
MSG_HELP_ogCleanLinuxDevices=""
MSG_HELP_ogCleanOs="Elimina los archivos que no son necesarios en el sistema operativo."
MSG_HELP_ogCompareChecksumFiles="Compara si coinciden las sumas de comprobación almacenadas de 2 ficheros."
MSG_HELP_ogConfigureFstab=""
MSG_HELP_ogConfigureOgagent="Configura el nuevo agente OGAgent para sistemas ooperativos."
MSG_HELP_ogCopyFile="Copia un fichero a otro almacenamiento."
MSG_HELP_ogCreateBootLoaderImage=""
MSG_HELP_ogCreateCache="Reserva espacio para la partición de caché al final del disco."
MSG_HELP_ogCreateDiskImage="Genera una imagen exacta de un disco completo."
MSG_HELP_ogCreateFileImage="Crea/Redimensiona el archivo de la imagen sincronizada"
MSG_HELP_ogCreateGptPartitions=""
MSG_HELP_ogCreateImage="Genera una imagen exacta de un sistema operativo instalado localmente."
MSG_HELP_ogCreateImageSyntax=""
MSG_HELP_ogCreateInfoImage="Crea informacion del contenido de la imagen"
MSG_HELP_ogCreateMbrImage="Genera una imagen del sector de arranque (MBR)."
MSG_HELP_ogCreatePartitions="Define la estructura de particiones de un disco."
MSG_HELP_ogCreatePartitionTable="Genera una tabla de particiones en caso de que no sea valida."
MSG_HELP_ogCreateTorrent=""
MSG_HELP_ogCopyEfiBootLoader="Copia el cargador de arranque desde la partición EFI a la de sistema."
MSG_HELP_ogDeleteCache="Elimina la partición de caché local."
MSG_HELP_ogDeleteFile="Borra un fichero de un espacio de almacenamiento."
MSG_HELP_ogDeletePartitionTable="Elimina la tabla de particiones del disco"
MSG_HELP_ogDeleteRegistryKey="Borra una clave vacía del registro de Windows."
MSG_HELP_ogDeleteRegistryValue="Borra un valor del registro de Windows."
MSG_HELP_ogDeleteTree="Borra un árbol de directorios de un espacio de almacenamiento."
MSG_HELP_ogDevToDisk="Devuelve el nº de orden de disco o de partición correspondiente al camino del fichero de dispositivo."
MSG_HELP_ogDiskToDev="Devuelve el camino del fichero de dispositivo correspondiente al nº de orden de disco o de partición."
MSG_HELP_ogDomainScript=""
MSG_HELP_ogEcho=""
MSG_HELP_ogExecAndLog=""
MSG_HELP_ogExtendFs="Extiende el tamaño de un sistema de archivo al máximo de su partición."
MSG_HELP_ogFindCache="Indica la partición reservada para caché local."
MSG_HELP_ogFixBootSector=""
MSG_HELP_ogFormatCache="Formatea (inicia) el sistema de caché local."
MSG_HELP_ogFormat="Formatea o reformatea un sistema de archivos."
MSG_HELP_ogFormatFs=$MSG_HELP_ogFormat
MSG_HELP_ogGetArch="Devuelve el tipo de arquitectura del cliente."
MSG_HELP_ogGetCacheSize="Devuelve el tamaño de la partición de caché local."
MSG_HELP_ogGetCacheSpace="Devuelve el espacio máximo disponible que puede ser reservado para la partición de caché local."
MSG_HELP_ogGetCaller=""
MSG_HELP_ogGetDiskSize="Devuelve el tamaño del disco."
MSG_HELP_ogGetDiskType="Devuelve el mnemónico de tipo de disco."
MSG_HELP_ogGetFreeSize=""
MSG_HELP_ogGetFsSize="Devuelve el tamaño de un sistema de archivos."
MSG_HELP_ogGetFsType="Devuelve el mnemónico de tipo de sistema de archivos."
MSG_HELP_ogGetGroupDir="Devuelve el camino del directorio por defecto para el grupo del cliente."
MSG_HELP_ogGetGroupName="Devuelve el nombre del grupo al que pertenece el cliente."
MSG_HELP_ogGetHivePath="Devuelve el camino completo del fichero de una sección del registro de Windows."
MSG_HELP_ogGetHostname="Devuelve el nombre de la máquina local."
MSG_HELP_ogGetImageCompressor="Devuelve la herramienta de compresión de la imagen."
MSG_HELP_ogGetImageInfo="Muestra información sobre la imagen monolitica: clonacion:compresor:sistemaarchivos:tamañoKB."
MSG_HELP_ogGetImageProgram="Devuelve el programa usado para crear la imagen."
MSG_HELP_ogGetImageSize="Devuelve el tamaño de una imagen de sistema."
MSG_HELP_ogGetImageType="Devuelve el sistema de ficheros de la imagen."
MSG_HELP_ogGetIpAddress="Devuelve la dirección IP del cliente."
MSG_HELP_ogGetLastSector="Devuelve el último sector usable del disco o de una partición."
MSG_HELP_ogGetMacAddress="Devuelve la dirección Ethernet del cliente."
MSG_HELP_ogGetMountImageDir="Devuelve el directorio de montaje de una imagen."
MSG_HELP_ogGetMountPoint="Devuelve el directorio donde está montado un sistema de archivos local."
MSG_HELP_ogGetNetInterface=""
MSG_HELP_ogGetOsType="Devuelve el tipo de un sistema operativo instalado."
MSG_HELP_ogGetOsUuid=""
MSG_HELP_ogGetOsVersion="Devuelve el tipo y la versión de un sistema operativo instalado."
MSG_HELP_ogGetParentPath="Devuelve el camino completo del directorio padre de un fichero de sistema OpenGnsys."
MSG_HELP_ogGetPartitionActive="Indica cual es la partición marcada como activa en un disco."
MSG_HELP_ogGetPartitionId="Devuelve el identificador de tipo de una partición."
MSG_HELP_ogGetPartitionSize="Devuelve el tamaño de una partición."
MSG_HELP_ogGetPartitionsNumber=""
MSG_HELP_ogGetPartitionTableType="Devuelve el tipo de tabla de particiones del disco"
MSG_HELP_ogGetPartitionType="Devuelve el mnemónico de tipo de una partición."
MSG_HELP_ogGetPath="Devuelve el camino completo de un fichero de sistema OpenGnsys."
MSG_HELP_ogGetRegistryValue="Devuelve el dato de un valor del registro de Windows."
MSG_HELP_ogGetRepoIp="Devuelve la dirección IP del repositorio de datos."
MSG_HELP_ogGetSerialNumber="Devuelve el número de serie del cliente."
MSG_HELP_ogGetServerIp="Devuelve la dirección IP del servidor principal."
MSG_HELP_ogGetSizeParameters="Devuelve el tamaño de los datos de un sistema de ficheros, el espacio necesario para la imagen y si cabe en el repositorio elegido."
MSG_HELP_ogGetWindowsName="Devuelve el nombre del cliente guardado en el registro de Windows."
MSG_HELP_ogGrubAddOgLive="Incluye en el grub del MBR una entrada llamando al cliente de opengnsys."
MSG_HELP_ogGrubDefaultEntry="Configura la entrada por defecto de GRUB."
MSG_HELP_ogGrubDeleteEntry="Borra en el grub del MBR las entradas para el inicio en una particion."
MSG_HELP_ogGrubHidePartitions="Configura el grub del MBR para que oculte las particiones de windows que no se esten iniciando. Permite definir una partición que no se ocultará (ej: para datos)."
MSG_HELP_ogGrubInstallMbr="Instal·la el carregador d'arrencada GRUB al MBR del primer disc dur"
MSG_HELP_ogGrubInstallPartition="Instal·la el carregador d'arrencada BURG al BootSector"
MSG_HELP_ogGrubOgliveDefaultEntry="Configura la entrada de ogLive como la entrada por defecto de GRUB."
MSG_HELP_ogGrubSecurity="Configura usuario y clave para modificar las entradas del menu del Grub."
MSG_HELP_ogGrubUefiConf="Genera el fichero grub.cfg de la partición EFI."
MSG_HELP_ogHelp="Muestra mensajes de ayudas para las funciones."
MSG_HELP_ogHidePartition="Oculta una partición de Windows."
MSG_HELP_ogIdToType="Devuelve el mnemónico asociado al identificador de tipo de partición."
MSG_HELP_ogNvramActiveEntry="Configura a activa entrada del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramAddEntry="Crea nueva entrada del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramDeleteEntry="Borra entrada del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramGetCurrent="Muestra la entrada del gestor de arranque (NVRAM) que ha iniciado el equipo."
MSG_HELP_ogNvramGetNext="Muestra la entrada del gestor de arranque (NVRAM) que se utilizará en el próximo arranque."
MSG_HELP_ogNvramGetOrder="Muestra el orden de las entradas del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramGetTimeout="Muestra el tiempo de espera del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramInactiveEntry="Configura a inactiva entrada del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramList="Lista las entradas del gestor de arranque (NVRAN) marcando con un asterisco las activas"
MSG_HELP_ogNvramSetNext="Configura el próximo arranque con la entrada del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramSetOrder="Configura el orden de las entradas del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramSetTimeout="Configura el tiempo de espera del gestor de arranque (NVRAM)."
MSG_HELP_ogGetOsType="Devuelve el tipo de un sistema operativo instalado."
MSG_HELP_ogInstallFirstBoot="Crea un archivo que se ejecutará en el primer arranque de Windows."
MSG_HELP_ogInstallLaunchDaemon="Instala un archivo que se ejecutará en el arranque de macOS."
MSG_HELP_ogInstallLinuxClient="$MSG_OBSOLETE."
MSG_HELP_ogInstallMiniSetup="Instala un archivo que se ejecutará en el arranque de Windows."
MSG_HELP_ogInstallRunonce="Crea un archivo que se ejecutará en el inicio de un usuario administrador de Windows."
MSG_HELP_ogInstallWindowsClient="$MSG_OBSOLETE."
MSG_HELP_ogIsFormated="Comprueba si un sistema de archivos está formateado."
MSG_HELP_ogIsImageLocked="Comprueba si una imagen está bloqueada por una operación de uso exclusivo."
MSG_HELP_ogIsLocked="Comprueba si una partición o su disco están bloqueados por una operación de uso exclusivo."
MSG_HELP_ogIsDiskLocked="Comprueba si un disco está bloqueado por una operación de uso exclusivo."
MSG_HELP_ogIsMounted="Comprueba si un sistema de archivos está montado."
MSG_HELP_ogIsNewerFile="Comprueba si un fichero es más nuevo (se ha modificado después) que otro."
MSG_HELP_ogIsPartitionLocked=$MSG_HELP_ogIsLocked
MSG_HELP_ogIsRepoLocked=""
MSG_HELP_ogIsSyncImage="Comprueba si la imagen es sincronizable."
MSG_HELP_ogIsVirtualMachine=""
MSG_HELP_ogIsWritable="Comprueba si un sistema de archivos está montado con permiso de escritura."
MSG_HELP_ogLinuxBootParameters="Devuelve los parámetros de arranque de un sistema operativo Linux instalado."
MSG_HELP_ogListHardwareInfo="Lista el inventario de dispositivos del cliente."
MSG_HELP_ogListLogicalPartitions=""
MSG_HELP_ogListPartitions="Lista la estructura de particiones de un disco."
MSG_HELP_ogListPrimaryPartitions=""
MSG_HELP_ogListRegistryKeys="Lista los nombres de las subclaves incluidas en una clave del registro de Windows."
MSG_HELP_ogListRegistryValues="Lista los nombres de los valores incluidos en una clave del registro de Windows."
MSG_HELP_ogListSoftware="Lista el inventario de programas instalados en un sistema operativo."
MSG_HELP_ogLock="Bloquea una partición para operación de uso exclusivo."
MSG_HELP_ogLockDisk="Bloquea un disco para operación de uso exclusivo."
MSG_HELP_ogLockImage="Bloquea una imagen para operación de uso exclusivo."
MSG_HELP_ogLockPartition=$MSG_HELP_ogLock
MSG_HELP_ogMakeChecksumFile="Almacena la suma de comprobación de un fichero."
MSG_HELP_ogMakeDir="Crea un directorio para OpenGnsys."
MSG_HELP_ogMakeGroupDir="Crea el directorio de grupo (aula) en un repositorio."
MSG_HELP_ogMcastReceiverFile=""
MSG_HELP_ogMcastReceiverPartition=""
MSG_HELP_ogMcastRequest=""
MSG_HELP_ogMcastSendFile=""
MSG_HELP_ogMcastSendPartition=""
MSG_HELP_ogMcastSyntax=""
MSG_HELP_ogMountCache="Monta el sistema de archivos dedicado a caché local."
MSG_HELP_ogMountCdrom="Monta dispositivo óptico por defecto."
MSG_HELP_ogMountFs=$MSG_HELP_ogMount
MSG_HELP_ogMountImage="Monta una imagen sincronizable"
MSG_HELP_ogMount="Monta un sistema de archivos y devuelve el punto de montaje."
MSG_HELP_ogNvramActiveEntry="Configura a activa entrada del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramAddEntry="Crea nueva entrada del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramDeleteEntry="Borra entrada del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramGetCurrent="Muestra la entrada del gestor de arranque (NVRAM) que ha iniciado el equipo."
MSG_HELP_ogNvramGetNext="Muestra la entrada del gestor de arranque (NVRAM) que se utilizará en el próximo arranque."
MSG_HELP_ogNvramGetOrder="Muestra el orden de las entradas del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramGetTimeout="Muestra el tiempo de espera del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramInactiveEntry="Configura a inactiva entrada del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramList="Lista las entradas del gestor de arranque (NVRAN) marcando con un asterisco las activas"
MSG_HELP_ogNvramPxeFirstEntry="Configura la tarjeta de red como primer arranque en la NVRAM."
MSG_HELP_ogNvramSetNext="Configura el próximo arranque con la entrada del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramSetOrder="Configura el orden de las entradas del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramSetTimeout="Configura el tiempo de espera del gestor de arranque (NVRAM)."
MSG_HELP_ogRaiseError="Muestra y registra mensajes de error y devuelve el código correspondiente."
MSG_HELP_ogReduceFs="Reduce el tamaño del sistema de archivos al mínimo ocupado por sus datos."
MSG_HELP_ogReduceImage="Reduce el tamaño de la imagen"
MSG_HELP_ogRefindDeleteEntry="Borra en rEFInd las entradas para el inicio en una particion."
MSG_HELP_ogRefindDefaultEntry="Configura la entrada por defecto de rEFInd."
MSG_HELP_ogRefindOgliveDefaultEntry="Configura la entrada de ogLive como la entrada por defecto de rEFInd."
MSG_HELP_ogRefindSetTheme="Asigna un tema al rEFInd."
MSG_HELP_ogRefindSetTimeOut="Define el tiempo (segundos) que se muestran las opciones de inicio de rEFInd."
MSG_HELP_ogRefindSetResolution="Define la resolución que usuará el thema del gestor de arranque rEFInd."
MSG_HELP_ogRefindInstall="Instala y configura el gestor rEFInd en la particion EFI"
MSG_HELP_ogRestoreAclImage=""
MSG_HELP_ogRestoreBootLoaderImage=""
MSG_HELP_ogRestoreDiskImage="Restaura una imagen de un disco completo."
MSG_HELP_ogRestoreEfiBootLoader="Copia el cargador de arranque de la partición de sistema a la partición EFI."
MSG_HELP_ogRestoreImage="Restaura una imagen de sistema operativo."
MSG_HELP_ogRestoreInfoImage="Restablece informacion del sistema: acl y enlaces simbolicos"
MSG_HELP_ogRestoreMbrImage="Restaura una imagen del sector de arranque (MBR)."
MSG_HELP_ogRestoreUuidPartitions="Restaura los uuid de las particiones y la tabla de particiones."
MSG_HELP_ogSaveImageInfo="Crea un fichero con la información de la imagen."
MSG_HELP_ogSetLinuxName=""
MSG_HELP_ogSetPartitionActive="Establece el número de partición activa de un disco."
MSG_HELP_ogSetPartitionId="Modifica el tipo de una partición física usando el mnemónico del tipo."
MSG_HELP_ogSetPartitionSize="Establece el tamaño de una partición."
MSG_HELP_ogSetPartitionType="Modifica el identificador de tipo de una partición física."
MSG_HELP_ogSetRegistryValue="Asigna un dato a un valor del registro de Windows."
MSG_HELP_ogSetWindowsName="Asigna el nombre del cliente en el registro de Windows."
MSG_HELP_ogSetWinlogonUser="Asigna el nombre de usuario por defecto para el gestor de entrada de Windows."
MSG_HELP_ogSyncCreate="Sincroniza los datos de la particion a la imagen"
MSG_HELP_ogSyncRestore="Sincroniza los datos de la imagen a la particion"
MSG_HELP_ogTorrentStart=""
MSG_HELP_ogTypeToId="Devuelve el identificador asociado al mnemónico de tipo de partición."
MSG_HELP_ogUcastReceiverPartition=""
MSG_HELP_ogUcastSendFile=""
MSG_HELP_ogUcastSendPartition=""
MSG_HELP_ogUcastSyntax=""
MSG_HELP_ogUnhidePartition="Hace visible una partición de Windows."
MSG_HELP_ogUninstallLinuxClient="Desinstala el cliente OpenGnSys en un sistema operativo Linux."
MSG_HELP_ogUninstallWindowsClient="Desinstala el cliente OpenGnSys en un sistema operativo Windows."
MSG_HELP_ogUnlock="Desbloquea una partición tras finalizar una operación de uso exclusivo."
MSG_HELP_ogUnlockDisk="Desbloquea un disco tras finalizar una operación de uso exclusivo."
MSG_HELP_ogUnlockImage="Desbloquea una imagen tras finalizar una operación de uso exclusivo."
MSG_HELP_ogUnlockPartition=$MSG_HELP_ogUnlock
MSG_HELP_ogUnmountAll="Desmonta todos los sistemas de archivos."
MSG_HELP_ogUnmountCache="Desmonta el sistema de archivos de caché local."
MSG_HELP_ogUnmount="Desmonta un sistema de archivos."
MSG_HELP_ogUnmountFs=$MSG_HELP_ogUnmount
MSG_HELP_ogUnmountImage="Desmonta la imagen"
MSG_HELP_ogUnsetDirtyBit=""
MSG_HELP_ogUpdateCacheIsNecesary="Comprueba si es necesario actualizar una archivo en la cache local."
MSG_HELP_ogUpdatePartitionTable="Actualiza informacion tabla particiones del disco"
MSG_HELP_ogUuidChange="Reemplaza el UUID de un sistema de ficheros."
MSG_HELP_ogWaitSyncImage=""
MSG_HELP_ogWindowsBootParameters=""
MSG_HELP_ogWindowsRegisterPartition=""
# Scripts
MSG_HELP_configureOs="Post-configura de arranque del sistema"
MSG_HELP_createBaseImage="Genera imagen basica de la particion"
MSG_HELP_createDiffImage="Genera imagen diferencial de la particion respecto a la imagen basica"
MSG_HELP_installOfflineMode="Prepara el equipo cliente para el modo offline."
MSG_HELP_partclone2sync="Convierte imagen de partclone en imagen sincronizable."
MSG_HELP_restoreBaseImage="Restaura una imagen basica en una particion"
MSG_HELP_restoreDiffImage="Restaura una imagen diferencial en una particion"
MSG_HELP_updateCache="Realiza la actualizacion de la cache"
# Mensajes de descripción breve de la interfaz.
MSG_INTERFACE_START="[START Interface] Ejecutar comando: "
MSG_INTERFACE_END="[END Interface] Comando terminado con este código: "
# Mensajes de scripts.
MSG_SCRIPTS_START=" INICIO scripts : "
MSG_SCRIPTS_END=" FIN scripts: "
MSG_SCRIPTS_TASK_END="Fin de la tarea"
MSG_SCRIPTS_TASK_SLEEP="Esperando para iniciar"
MSG_SCRIPTS_TASK_START="Iniciando"
MSG_SCRIPTS_TASK_ERR="Error"
# Script createImage.
MSG_SCRIPTS_FILE_RENAME=" Renombrar fichero-imagen previo: "
MSG_SCRIPTS_CREATE_SIZE=" Calcular espacio (KB) requerido para almacenarlo y el disponible: "
# Script updateCache.
MSG_SCRIPTS_UPDATECACHE_DOUPDATE="comprovar si es necessari actualitzar el fitxer imatge"
MSG_SCRIPTS_UPDATECACHE_CHECKSIZECACHE="Comprobar que el tamaño de la cache es mayor que el fichero a descargar."
# Script updateCache: para las imágenes sincronizadas tipo dir.
MSG_SCRIPTS_UPDATECACHE_CHECKSIZEDIR="Calculamos el tamaño de la imagen."
MSG_SCRIPTS_UPDATECACHE_CHECKSIZEIMG="Comprobamos si hay que la imagen del repositorio es mayor que la de la cache."
MSG_SCRIPTS_UPDATECACHE_IFNOTCACHEDO="Comprobar el espacio libre de la cache y actuar según engine.cfg"
MSG_SCRIPTS_UPDATECACHE_CHECKMCASTSESSION="Comprobando sesion multicast: ServidorMcast:PuertoDatos"
# interface sustituye temporalmente al scritp restore
MSG_SCRIPTS_CHECK_ENGINE="Analizar proceso a realizar según engine.cfg"
MSG_SCRIPTS_MULTICAST_PRECHECK_PORT="Determinar puerto principal y auxiliar multicast."
MSG_SCRIPTS_MULTICAST_CHECK_PORT="Comprobar puertos de sesion y datos"
MSG_SCRIPTS_MULTICAST_REQUEST_PORT="Solicitar la apertura: "
MSG_SCRIPTS_OS_CONFIGURE="Iniciar la configuracion del sistema restaurado"
# TIME MESSAGES
MSG_SCRIPTS_TIME_TOTAL="tiempo total del proceso"
MSG_SCRIPTS_TIME_PARTIAL="tiempo parcial del subproceso"
# HTTPLOG
MSG_HTTPLOG_NOUSE="No apague este ordenador por favor"
# Mensajes sincronizadas
MSG_SYNC_RESIZE="Redimensiona la imagen al tamaño necesario"
MSG_SYNC_RESTORE="Trae el listado ficheros y baja la imagen"
MSG_SYNC_DELETE="Diferencial: Borra archivos antiguos"
MSG_SYNC_SLEEP="Espera que se monte/reduzca la imagen"
# Mensajes sincronizadas complementarios a errores
MSG_SYNC_DIFFERENTFS="El sistema de ficheros de destino no coincide con el de la imagen"
MSG_SYNC_EXTENSION="Las extensiones de la imagenes deben ser img o diff"
MSG_SYNC_NOCHECK="La imagen esta montada por otro proceso, no podemos comprobarla"
MSG_RESTORE="Restaura la imagen en"

View File

@ -0,0 +1 @@
lang.en_GB.conf

View File

@ -0,0 +1,385 @@
# English language file.
#@version 1.1.0
#@author Jose Miguel Hernandez - Universidad de Salamanca
#@date 2018-03-01
# Error messages.
MSG_ERR_GENERIC="Undefined unknown error"
MSG_ERR_FORMAT="Wrong execution format"
MSG_ERR_OUTOFLIMIT="Out of range or invalid value"
MSG_ERR_NOTFOUND="File or device not found"
MSG_ERR_PARTITION="Unknown or wrong partition"
MSG_ERR_LOCKED="Resource locked by exclusive use operation"
MSG_ERR_CACHE="Local cache error"
MSG_ERR_NOGPT="Current disk does not include GPT partition"
MSG_ERR_REPO="Failed when mounting images repository"
MSG_ERR_NOMSDOS="Current disk does not include MSDOS partition"
MSG_ERR_FILESYS="Unknown or unmountable file system"
MSG_ERR_NOTOS="Cannot detect or boot OS"
MSG_ERR_IMAGE="Cannot create or restore a system image"
MSG_ERR_IMAGEFILE="Image file corrupt or of other partclone version"
MSG_ERR_NOTEXEC="Non executable program or function"
MSG_ERR_NOTWRITE="Write access denied"
MSG_ERR_NOTCACHE="No client cache partition"
MSG_ERR_NOTUEFI="UEFI isn't active"
MSG_ERR_NOTBIOS="BIOS legacy isn't active"
MSG_ERR_CACHESIZE="Not enough space in local or remote cache"
MSG_ERR_REDUCEFS="Error when reducing file system"
MSG_ERR_EXTENDFS="Error when expanding file system"
MSG_ERR_IMGSIZEPARTITION="Backup error: Partition smaller than image"
MSG_ERR_UPDATECACHE="Error when running `updateCache´ command"
MSG_ERR_UCASTSYNTAXT="Error when generating Unicast transfer syntax"
MSG_ERR_UCASTSENDPARTITION="Error when sending a Unicast partition"
MSG_ERR_UCASTSENDFILE="Error when sending a Unicast file"
MSG_ERR_UCASTRECEIVERPARTITION="Error when receiving an Unicast partition"
MSG_ERR_UCASTRECEIVERFILE="Error when receiving an Unicast file"
MSG_ERR_MCASTSYNTAXT="Error when generating Multicast transfer syntax"
MSG_ERR_MCASTSENDFILE="Error when sending Multicast file"
MSG_ERR_MCASTRECEIVERFILE="Error when receiving Multicast file"
MSG_ERR_MCASTSENDPARTITION="Error when sending Multicast partition"
MSG_ERR_MCASTRECEIVERPARTITION="Error when receiving Multicast partition "
MSG_ERR_PROTOCOLJOINMASTER="Error when connecting Unicast/Multicast session to Master"
MSG_ERR_DONTFORMAT="Formatting Error"
MSG_ERR_DONTMOUNT_IMAGE="Error when mounting/reducing image"
MSG_ERR_DONTUNMOUNT_IMAGE="Error when unmounting image"
MSG_ERR_DONTSYNC_IMAGE="Unsynchronizable image"
MSG_ERR_NOTDIFFERENT="Basic image identical to partition"
MSG_ERR_SYNCHRONIZING="Synchronizing error, it may affect image creation/restoration process"
# Warning messages.
MSG_DONTUSE="DO NOT USE"
MSG_DONTMOUNT="Unmounted file system"
MSG_DONTUNMOUNT="Cannot unmount file system or it isn't mounted"
MSG_MOUNT="File system already mounted"
MSG_MOUNTREADONLY="Read-only file system mounted"
MSG_OBSOLETE="OBSOLETE"
# Auxiliary help messages.
MSG_64BIT="64-bit"
MSG_DISK="Disk"
MSG_ERROR="Error"
MSG_EXAMPLE="Example"
MSG_FORMAT="Format"
MSG_FUNCTION="Function"
MSG_HARDWAREINVENTORY="Hardware inventory"
MSG_IMAGE="Image"
MSG_INSTALLED="Installed"
MSG_NOCACHE="No local cache"
MSG_NOEXTENDED="No extended partition"
MSG_PARTITION="Partition"
MSG_PROTOCOL="Protocol"
MSG_RESERVEDVALUE="Reserved value"
MSG_SEE="See"
MSG_UNKNOWN="Unknown"
MSG_WARNING="Warning"
# Boot process messages.
MSG_DETECTLVMRAID="Detecting LVM and RAID meta-devices."
MSG_ERRBOOTMODE="$MSG_ERROR: Unknown boot mode."
MSG_LAUNCHCLIENT="Launching client browser."
MSG_LOADAPI="Loading cloning-engine functions."
MSG_LOADMODULES="Loading kernel modules."
MSG_MAKELINKS="Creating symbolic links."
MSG_MOUNTREPO="Mounting repository using %s by %s mode."
MSG_OFFLINEMODE="Off-line boot mode."
MSG_OTHERSERVICES="Starting client complementary services."
MSG_POWEROFFCONF="Defining power-saving parameters."
# Default menu messages.
MSG_BOOT="Boot"
MSG_DUPLEX="Duplex"
MSG_HOSTNAME="Hostname"
MSG_IPADDR="IP Address"
MSG_MACADDR="MAC Address"
MSG_MENUTITLE="Options menu"
MSG_POWEROFF="Shutdown computer"
MSG_SPEED="Speed"
# API functions messages.
MSG_HELP_ogAclFilter="Draws ACL files from differential image."
MSG_HELP_ogAddCmd="Adds commands to file created by ogInstalMiniSetup."
MSG_HELP_ogAddRegistryKey="Adds new Windows registry key."
MSG_HELP_ogAddRegistryValue="Adds new Windows registry value."
MSG_HELP_ogAddToLaunchDaemon=""
MSG_HELP_ogBoot="Boots installed OS."
MSG_HELP_ogBootLoaderDeleteEntry="$MSG_DONTUSE."
MSG_HELP_ogBootLoaderHidePartitions="$MSG_DONTUSE."
MSG_HELP_ogBootMbrGeneric=""
MSG_HELP_ogBootMbrXP=""
MSG_HELP_ogBurgDefaultEntry="Sets default Burg entry."
MSG_HELP_ogBurgDeleteEntry="Deletes partition start-entries from MBR BURG."
MSG_HELP_ogBurgHidePartitions="Sets MBR Burg to hide non starting windows partitions. Allows you to select a partition that will not be hidden (e.g. for data)."
MSG_HELP_ogBurgInstallMbr="Installs BURG boot-loader on 1st HD MBR."
MSG_HELP_ogBurgOgliveDefaultEntry="Sets ogLive input as default Burg input."
MSG_HELP_ogCalculateChecksum="Calculates file checksum."
MSG_HELP_ogCalculateFullChecksum="Calculates file full checksum"
MSG_HELP_ogChangeRepo="Changes repository for remote resource: images."
MSG_HELP_ogCheckFs="Checks file system consistence."
MSG_HELP_ogCheckIpAddress=""
MSG_HELP_ogCheckProgram=""
MSG_HELP_ogCheckStringInGroup=""
MSG_HELP_ogCheckStringInReg=""
MSG_HELP_ogCheckSyncImage="Displays image contents to check it."
MSG_HELP_ogCleanLinuxDevices=""
MSG_HELP_ogCleanOs="Deletes OS unnecessary files."
MSG_HELP_ogCompareChecksumFiles="Compares if the checksums match."
MSG_HELP_ogConfigureFstab=""
MSG_HELP_ogConfigureOgagent="Sets OS new agent: OGAgent."
MSG_HELP_ogCopyFile="Copies file to another storage unit ."
MSG_HELP_ogCreateBootLoaderImage=""
MSG_HELP_ogCreateCache="Saves space for cache partition at the end of disk."
MSG_HELP_ogCreateDiskImage="Creates exact image from local disk."
MSG_HELP_ogCreateFileImage="Creates/Resizes synchronized image file."
MSG_HELP_ogCreateGptPartitions=""
MSG_HELP_ogCreateImage="Creates exact image from local installed OS."
MSG_HELP_ogCreateImageSyntax=""
MSG_HELP_ogCreateInfoImage="Creates image content information."
MSG_HELP_ogCreateMbrImage="Creates MBR image."
MSG_HELP_ogCreatePartitions="Creates disk partition table."
MSG_HELP_ogCreatePartitionTable="Creates partition table, if necessary."
MSG_HELP_ogCreateTorrent=""
MSG_HELP_ogCopyEfiBootLoader="Copy the boot loader from the EFI partition to system partition."
MSG_HELP_ogDeleteCache="Deletes local cache partition."
MSG_HELP_ogDeleteFile="Deletes file from storage."
MSG_HELP_ogDeletePartitionTable="Deletes disk table partition"
MSG_HELP_ogDeleteRegistryKey="Deletes empty Windows registry key."
MSG_HELP_ogDeleteRegistryValue="Deletes Windows registry value."
MSG_HELP_ogDeleteTree="Deletes directory tree."
MSG_HELP_ogDevToDisk="Returns disk or partition ordinal number for device file path."
MSG_HELP_ogDiskToDev="Returns device file path for disk or partition ordinal number."
MSG_HELP_ogDomainScript=""
MSG_HELP_ogEcho="Displays and log messages."
MSG_HELP_ogExecAndLog="Runs and logs command"
MSG_HELP_ogExtendFs="Expands file system size to partition maximum."
MSG_HELP_ogFindCache="Shows local cache reserved partition."
MSG_HELP_ogFixBootSector=""
MSG_HELP_ogFormatCache="Formats (clears) local cache."
MSG_HELP_ogFormat="Formats file system."
MSG_HELP_ogFormatFs=$MSG_HELP_ogFormat
MSG_HELP_ogGetArch="Returns client architecture."
MSG_HELP_ogGetCacheSize="Returns local cache partition size."
MSG_HELP_ogGetCacheSpace="Returns maximum available space that can be reserved for local cache partition."
MSG_HELP_ogGetCaller="Returns program or function which is calling to current one"
MSG_HELP_ogGetDiskSize="Returns disk size."
MSG_HELP_ogGetDiskType="Returns disk type."
MSG_HELP_ogGetFreeSize=""
MSG_HELP_ogGetFsSize="Returns file system size."
MSG_HELP_ogGetFsType="Returns file system type."
MSG_HELP_ogGetGroupDir="Returns default directory path for client group."
MSG_HELP_ogGetGroupName="Returns client group name."
MSG_HELP_ogGetHivePath="Returns full path of file from Windows registry section."
MSG_HELP_ogGetHostname="Returns local hostname."
MSG_HELP_ogGetImageCompressor="Returns image compression tool."
MSG_HELP_ogGetImageInfo="Displays monolithic image information: cloning; compressor; file system; size(KB)."
MSG_HELP_ogGetImageProgram="Returns used program to create image."
MSG_HELP_ogGetImageSize="Returns system image size."
MSG_HELP_ogGetImageType="Returns image file system."
MSG_HELP_ogGetIpAddress="Returns client IP."
MSG_HELP_ogGetLastSector="Returns last available sector from disk or partition."
MSG_HELP_ogGetMacAddress="Returns client Ethernet address."
MSG_HELP_ogGetMountImageDir="Returns mounting directory of image."
MSG_HELP_ogGetMountPoint="Returns directory of local file system mount point."
MSG_HELP_ogGetNetInterface=""
MSG_HELP_ogGetOsType="Returns installed OS type."
MSG_HELP_ogGetOsUuid="Returns OS UUID"
MSG_HELP_ogGetOsVersion="Returns OS version."
MSG_HELP_ogGetParentPath="Returns full path of OpenGnsys system file parent directory."
MSG_HELP_ogGetPartitionActive="Returns disk active partition."
MSG_HELP_ogGetPartitionId="Returns partition type ID."
MSG_HELP_ogGetPartitionSize="Returns partition size."
MSG_HELP_ogGetPartitionsNumber="Returns disk partitions number."
MSG_HELP_ogGetPartitionTableType="Returns disk partition table type."
MSG_HELP_ogGetPartitionType="Returns partition type."
MSG_HELP_ogGetPath="Returns full path of OpenGnsys system file."
MSG_HELP_ogGetRegistryValue="Returns data from Windows registry value."
MSG_HELP_ogGetRepoIp="Returns OpenGnsys Repository IP address ."
MSG_HELP_ogGetSerialNumber="Returns host serial number."
MSG_HELP_ogGetServerIp="Returns main OpenGnsys Server IP address."
MSG_HELP_ogGetSizeParameters="Returns file system data size, required space for image and if it fits in the chosen repository."
MSG_HELP_ogGetWindowsName="Returns saved client name on Windows registry."
MSG_HELP_ogGrubAddOgLive="Adds MBR grub an entry calling Opengnsys client."
MSG_HELP_ogGrubDefaultEntry="Sets GRUB default entry."
MSG_HELP_ogGrubDeleteEntry="Deletes partition start entries on MBR grub."
MSG_HELP_ogGrubHidePartitions="Sets MBR grub to hide non starting Windows partitions. Allows you to select a partition that will not be hidden (e.g. for data)."
MSG_HELP_ogGrubInstallMbr="Installs GRUB boot loader on 1st HD MBR"
MSG_HELP_ogGrubInstallPartition="Installs GRUB boot loader on BootSector"
MSG_HELP_ogGrubOgliveDefaultEntry="Sets ogLive entry as default GRUB entry."
MSG_HELP_ogGrubSecurity="Configures user and password for change the menu entries of grub."
MSG_HELP_ogGrubUefiConf="Generates the grub.cfg file of the EFI partition."
MSG_HELP_ogHelp="Shows functions help messages."
MSG_HELP_ogHidePartition="Hides Windows partition."
MSG_HELP_ogIdToType="Returns partition type identifier."
MSG_HELP_ogInstallFirstBoot="Creates file to run on first Windows boot."
MSG_HELP_ogInstallLaunchDaemon="Installs file to run on MACos boot."
MSG_HELP_ogInstallLinuxClient="$MSG_OBSOLETE."
MSG_HELP_ogInstallMiniSetup="Installs file to run on Windows boot."
MSG_HELP_ogInstallRunonce="Creates file to run on admin-user Windows boot."
MSG_HELP_ogInstallWindowsClient="$MSG_OBSOLETE."
MSG_HELP_ogIsFormated="Checks file system if formatted."
MSG_HELP_ogIsImageLocked="Checks image if blocked by exclusive use operation."
MSG_HELP_ogIsLocked="Checks partition or disk if blocked by exclusive use operation."
MSG_HELP_ogIsDiskLocked="Checks disk if blocked by exclusive use operation."
MSG_HELP_ogIsMounted="Checks file system if mounted."
MSG_HELP_ogIsNewerFile="Checks if one file is newer (or has been modified later) than another one."
MSG_HELP_ogIsPartitionLocked=$MSG_HELP_ogIsLocked
MSG_HELP_ogIsRepoLocked=""
MSG_HELP_ogIsSyncImage="Checks image if synchronizable."
MSG_HELP_ogIsVirtualMachine="Checks if client is a virtual machine"
MSG_HELP_ogIsWritable="Checks if mounted file system has write permissions."
MSG_HELP_ogLinuxBootParameters="Returns installed Linux boot parameters."
MSG_HELP_ogListHardwareInfo="Lists the client hardware inventory."
MSG_HELP_ogListLogicalPartitions="Lists disk logic partitions."
MSG_HELP_ogListPartitions="Lists disk partitions table."
MSG_HELP_ogListPrimaryPartitions="Lists disk primary partitions"
MSG_HELP_ogListRegistryKeys="Lists sub-keys names included on a Windows registry key."
MSG_HELP_ogListRegistryValues="Lists value names included on a Windows registry key."
MSG_HELP_ogListSoftware="Lists OS installed programs inventory."
MSG_HELP_ogLock="Blocks partition for exclusive use operation."
MSG_HELP_ogLockDisk="Blocks disk for exclusive use operation."
MSG_HELP_ogLockImage="Blocks image for exclusive use operation."
MSG_HELP_ogLockPartition=$MSG_HELP_ogLock
MSG_HELP_ogMakeChecksumFile="Stores file checksum."
MSG_HELP_ogMakeDir="Makes OpenGnsys directory."
MSG_HELP_ogMakeGroupDir="Makes group (lab) directory on repository."
MSG_HELP_ogMcastReceiverFile=""
MSG_HELP_ogMcastReceiverPartition=""
MSG_HELP_ogMcastRequest=""
MSG_HELP_ogMcastSendFile=""
MSG_HELP_ogMcastSendPartition=""
MSG_HELP_ogMcastSyntax=""
MSG_HELP_ogMountCache="Mounts cache file system."
MSG_HELP_ogMountCdrom="Mounts default optical drive."
MSG_HELP_ogMountFs=$MSG_HELP_ogMount
MSG_HELP_ogMountImage="Mounts synchronizable image"
MSG_HELP_ogMount="Mounts file system and returns mount point."
MSG_HELP_ogNvramActiveEntry="Sets active a bootloader (NVRAM) entry."
MSG_HELP_ogNvramAddEntry="Creates new entry in bootloader (NVRAM)."
MSG_HELP_ogNvramDeleteEntry="Deletes a bootloader (NVRAM) entry."
MSG_HELP_ogNvramGetCurrent="Displays the bootloader (NVRAM) entry that was started by the computer."
MSG_HELP_ogNvramGetNext="Displays the bootloader (NVRAM) entry for the boot next."
MSG_HELP_ogNvramGetOrder="Displays the bootloader (NVRAM) entries order."
MSG_HELP_ogNvramGetTimeout="Displays the bootloader (NVRAM) timeout."
MSG_HELP_ogNvramInactiveEntry="Sets inactive bootloader (NVRAM) entry."
MSG_HELP_ogNvramList="Lists bootloader (NVRAM) entries, by staring actives ones."
MSG_HELP_ogNvramPxeFirstEntry="Set the network as the NVRAM first boot."
MSG_HELP_ogNvramSetNext="Set the bootloader (NVRAM) entry for the boot next."
MSG_HELP_ogNvramSetOrder="Sets the bootloader (NVRAM) entries order."
MSG_HELP_ogNvramSetTimeout="Sets the bootloader (NVRAM) timeout."
MSG_HELP_ogRaiseError="Displays and registers error messages and returns code."
MSG_HELP_ogReduceFs="Reduces file system size to minimum."
MSG_HELP_ogReduceImage="Reduces image size."
MSG_HELP_ogRefindDeleteEntry="Deletes the menu entry of a partition in rEFInd."
MSG_HELP_ogRefindDefaultEntry="Configures default menu entry in rEFInd.""
MSG_HELP_ogRefindOgliveDefaultEntry="Configures ogLive menu entry as default menu entry in rEFInd."
MSG_HELP_ogRefindSetTheme="Configures rEFInd's theme."
MSG_HELP_ogRefindSetTimeOut="Defines the time that rEFInd shows the menu."
MSG_HELP_ogRefindSetResolution="Defines the resolucion of rEFInd's theme."
MSG_HELP_ogRefindInstall="Installs and configures rEFInd boot loader in ESP."
MSG_HELP_ogRestoreAclImage="Restores Windows ACL (Inf. must be on /tmp)."
MSG_HELP_ogRestoreBootLoaderImage=""
MSG_HELP_ogRestoreDiskImage="Restores disk image."
MSG_HELP_ogRestoreEfiBootLoader="Copy the boot loader from the system partition to the EFI partition."
MSG_HELP_ogRestoreImage="Restore OS image."
MSG_HELP_ogRestoreInfoImage="Restores system information: ACL and symbolic links"
MSG_HELP_ogRestoreMbrImage="Restores boot sector image (MBR)."
MSG_HELP_ogRestoreUuidPartitions="Restores UUID of partitions and partition table."
MSG_HELP_ogSaveImageInfo="Creates the image information file."
MSG_HELP_ogSetLinuxName=""
MSG_HELP_ogSetPartitionActive="Sets active partition number of disk."
MSG_HELP_ogSetPartitionId="Changes partition ID using mnemonic."
MSG_HELP_ogSetPartitionSize="Sets partition size."
MSG_HELP_ogSetPartitionType="Changes partition type ID."
MSG_HELP_ogSetRegistryValue="Assigns data to a Windows registry values."
MSG_HELP_ogSetWindowsName="Assigns client name to Windows registry."
MSG_HELP_ogSetWinlogonUser="Assigns Windows default user name to Windows input manager."
MSG_HELP_ogSyncCreate="Synchronizes partition data to image"
MSG_HELP_ogSyncRestore="Synchronize image data to partition"
MSG_HELP_ogTorrentStart=""
MSG_HELP_ogTypeToId="Returns the ID of partition type mnemonic."
MSG_HELP_ogUcastReceiverPartition=""
MSG_HELP_ogUcastSendFile=""
MSG_HELP_ogUcastSendPartition=""
MSG_HELP_ogUcastSyntax=""
MSG_HELP_ogUnhidePartition="Unhides Windows partition."
MSG_HELP_ogUninstallLinuxClient="Uninstalls old OpenGnSys agent from Linux OS."
MSG_HELP_ogUninstallWindowsClient="Uninstalls oldOpenGnSys agent from Windows OS."
MSG_HELP_ogUnlock="Unlocks partition after exclusive use operation."
MSG_HELP_ogUnlockDisk="Unlocks disk after exclusive use operation."
MSG_HELP_ogUnlockImage="Unlocks image after exclusive use operation."
MSG_HELP_ogUnlockPartition=$MSG_HELP_ogUnlock
MSG_HELP_ogUnmountAll="Unmounts all file systems."
MSG_HELP_ogUnmountCache="Unmounts cache file system."
MSG_HELP_ogUnmountFs=$MSG_HELP_ogUnmount
MSG_HELP_ogUnmountImage="Unmounts image"
MSG_HELP_ogUnmount="Unmounts file system."
MSG_HELP_ogUnsetDirtyBit=
MSG_HELP_ogUpdateCacheIsNecesary="Checks if necessary file update in local cache."
MSG_HELP_ogUpdatePartitionTable="Updates disk partition table info "
MSG_HELP_ogUuidChange="Replaces the filesystem UUID"
MSG_HELP_ogWaitSyncImage=""
MSG_HELP_ogWindowsBootParameters=""
MSG_HELP_ogWindowsRegisterPartition=""
# Scripts
MSG_HELP_configureOs="Post-configure system boot"
MSG_HELP_createBaseImage="Create partition basic image"
MSG_HELP_createDiffImage="Create partition differential image from basic image"
MSG_HELP_installOfflineMode="Prepare client for off-line mode."
MSG_HELP_partclone2sync="Turn part-clone image into synchronizable image."
MSG_HELP_restoreBaseImage="Restore basic image into partition"
MSG_HELP_restoreDiffImage="Restore differential image into partition"
MSG_HELP_updateCache="Update cache"
# INTERFACE functions messages.
MSG_INTERFACE_START="[START Interface] Run command: "
MSG_INTERFACE_END="[END Interface] Command finished with this code: "
# SCRIPTS messages.
MSG_SCRIPTS_START=" START scripts: "
MSG_SCRIPTS_END=" END scripts: "
MSG_SCRIPTS_TASK_END="End of task"
MSG_SCRIPTS_TASK_SLEEP="Waiting to start"
MSG_SCRIPTS_TASK_START="Starting"
MSG_SCRIPTS_TASK_ERR="Error"
# createImage script
MSG_SCRIPTS_FILE_RENAME="Rename previous image-file: "
MSG_SCRIPTS_CREATE_SIZE="Check required and available storing space(KB): "
# updateCache script
MSG_SCRIPTS_UPDATECACHE_DOUPDATE="Check if it is necessary to update image file"
MSG_SCRIPTS_UPDATECACHE_CHECKSIZECACHE="Check if Cache size is bigger than image file size."
# Script updateCache: for dir synchronized images .
MSG_SCRIPTS_UPDATECACHE_CHECKSIZEDIR="Calculate image size."
MSG_SCRIPTS_UPDATECACHE_CHECKSIZEIMG="Check if repository image file size is bigger than Cache size."
MSG_SCRIPTS_UPDATECACHE_IFNOTCACHEDO="Check free Cache and apply engine.cfg"
MSG_SCRIPTS_UPDATECACHE_CHECKMCASTSESSION="Checking Multicast Session McastServer:DataPort"
# interface temporarily replaces restore script
MSG_SCRIPTS_CHECK_ENGINE="Analyze process to carry out according to engine.cfg"
MSG_SCRIPTS_MULTICAST_PRECHECK_PORT="Check main and auxiliary Multicast port."
MSG_SCRIPTS_MULTICAST_CHECK_PORT="Check session and data ports"
MSG_SCRIPTS_MULTICAST_REQUEST_PORT="Request Multicast port opening: "
MSG_SCRIPTS_OS_CONFIGURE="Start restored system setting"
# TIME MESSAGES
MSG_SCRIPTS_TIME_TOTAL="Total process time"
MSG_SCRIPTS_TIME_PARTIAL="Partial sub-process time"
# HTTPLOG
MSG_HTTPLOG_NOUSE="PLEASE DO NOT TURN OFF THIS COMPUTER"
# Messages for synchronized images (complementary to errors)
MSG_SYNC_RESIZE="Resize image to necessary size"
MSG_SYNC_RESTORE="Get files list and download image"
MSG_SYNC_DELETE="Differential: Delete old files"
MSG_SYNC_SLEEP="Wait for mounting/reducing image"
# Messages for synchronized images (complementary to errors)
MSG_SYNC_DIFFERENTFS="Destination file system does not match image"
MSG_SYNC_EXTENSION="Image extension must be img or diff"
MSG_SYNC_NOCHECK="Image mounted by another process. Cannot verify it"
MSG_RESTORE="Restore image on "

View File

@ -0,0 +1 @@
lang.es_ES.conf

View File

@ -0,0 +1,385 @@
# Fichero de idioma: español.
#@version 1.1.1
#@author
# Mensajes de error.
MSG_ERR_GENERIC="Error imprevisto no definido"
MSG_ERR_FORMAT="Formato de ejecución incorrecto"
MSG_ERR_OUTOFLIMIT="Valor fuera de rango o no válido"
MSG_ERR_NOTFOUND="Fichero o dispositivo no encontrado"
MSG_ERR_PARTITION="Partición errónea o desconocida"
MSG_ERR_LOCKED="Recurso bloqueado por operación de uso exclusivo"
MSG_ERR_CACHE="Error en partición de caché local"
MSG_ERR_NOGPT="El disco indicado no contiene una partición GPT"
MSG_ERR_REPO="Error al montar el repositorio de imágenes"
MSG_ERR_NOMSDOS="El disco indicado no contiene una partición MSDOS"
MSG_ERR_FILESYS="Sistema de archivos desconocido o no se puede montar"
MSG_ERR_NOTOS="Sistema operativo no detectado o no se puede iniciar"
MSG_ERR_IMAGE="No se puede crear o restaurar una image de sistema"
MSG_ERR_IMAGEFILE="Archivo de imagen corrupto o de otra versión de partclone"
MSG_ERR_NOTEXEC="Programa o función no ejecutable"
MSG_ERR_NOTWRITE="No hay acceso de escritura"
MSG_ERR_NOTCACHE="No existe partición caché en el cliente"
MSG_ERR_NOTUEFI="La interfaz UEFI no está activa"
MSG_ERR_NOTBIOS="La interfaz BIOS Legacy no está activa"
MSG_ERR_CACHESIZE="El espacio de la caché local o remota no es suficiente"
MSG_ERR_REDUCEFS="Error al reducir el sistema de archivos"
MSG_ERR_EXTENDFS="Error al expandir el sistema de archivos"
MSG_ERR_IMGSIZEPARTITION="Error al restaurar: Partición mas pequeña que la imagen"
MSG_ERR_UPDATECACHE="Error al realizar el comando updateCache"
MSG_ERR_UCASTSYNTAXT="Error en la generación de sintaxis de transferenica Unicast"
MSG_ERR_UCASTSENDPARTITION="Error en envío Unicast de una partición"
MSG_ERR_UCASTSENDFILE="Error en envío Unicast de un fichero"
MSG_ERR_UCASTRECEIVERPARTITION="Error en la recepción Unicast de una partición"
MSG_ERR_UCASTRECEIVERFILE="Error en la recepción Unicast de un fichero"
MSG_ERR_MCASTSYNTAXT="Error en la generación de sintaxis de transferenica Multicast"
MSG_ERR_MCASTSENDFILE="Error en envío Multicast de un fichero"
MSG_ERR_MCASTRECEIVERFILE="Error en la recepción Multicast de un fichero"
MSG_ERR_MCASTSENDPARTITION="Error en envío Multicast de una partición"
MSG_ERR_MCASTRECEIVERPARTITION="Error en la recepción Multicast de un fichero"
MSG_ERR_PROTOCOLJOINMASTER="Error en la conexión de una sesión Unicast|Multicast con el Master"
MSG_ERR_DONTFORMAT="Error al formatear"
MSG_ERR_DONTMOUNT_IMAGE="Error al montar/reducir la imagen"
MSG_ERR_DONTUNMOUNT_IMAGE="Error al desmontar la imagen"
MSG_ERR_DONTSYNC_IMAGE="Imagen no sincronizable"
MSG_ERR_NOTDIFFERENT="No se detectan diferencias entre la imagen básica y la partición"
MSG_ERR_SYNCHRONIZING="Error al sincronizar, puede afectar la creacion|restauracion de la imagen"
# Mensajes de avisos.
MSG_DONTMOUNT="Sistema de archivos no montado"
MSG_DONTUSE="NO USAR"
MSG_DONTUNMOUNT="El sistema de archivos no se puede desmontar o no está montado"
MSG_MOUNT="Sistema de archivos montado"
MSG_MOUNTREADONLY="Sistema de archivos montado solo de lectura"
MSG_OBSOLETE="EN DESUSO"
# Mensajes complementarios para las ayudas.
MSG_64BIT="64 bits"
MSG_DISK="disco"
MSG_ERROR="Error"
MSG_EXAMPLE="Ejemplo"
MSG_FORMAT="Formato"
MSG_FUNCTION="Función"
MSG_HARDWAREINVENTORY="Inventario de hardware de la máquina"
MSG_IMAGE="imagen"
MSG_INSTALLED="instalado"
MSG_NOCACHE="sin caché local"
MSG_NOEXTENDED="sin partición extendida"
MSG_PARTITION="partición"
MSG_PROTOCOL="protocolo"
MSG_RESERVEDVALUE="Valor reservado"
MSG_SEE="Ver"
MSG_UNKNOWN="Desconocido"
MSG_WARNING="Aviso"
# Mensajes del proceso de arranque.
MSG_DETECTLVMRAID="Detectar metadispositivos LVM y RAID."
MSG_ERRBOOTMODE="$MSG_ERROR: Modo de arranque desconocido."
MSG_LAUNCHCLIENT="Ejecutar cliente."
MSG_LOADAPI="Cargar funciones del motor de clonación."
MSG_LOADMODULES="Cargar módulos del kernel."
MSG_MAKELINKS="Crear enlaces simbólicos."
MSG_MOUNTREPO="Montar repositorio por %s en modo %s."
MSG_OFFLINEMODE="Modo de arranque sin conexión."
MSG_OTHERSERVICES="Iniciar servicios complementarios del cliente."
MSG_POWEROFFCONF="Definir parámetros de ahorro de energía."
# Mensajes del menú por defecto.
MSG_BOOT="Iniciar"
MSG_DUPLEX="D&uacute;plex"
MSG_HOSTNAME="Equipo"
MSG_IPADDR="Direcci&oacute;n IP"
MSG_MACADDR="Direcci&oacute;n MAC"
MSG_MENUTITLE="Men&uacute; de opciones"
MSG_POWEROFF="Apagar el equipo"
MSG_SPEED="Velocidad"
# Mensajes de descripción breve de las funciones de la API.
MSG_HELP_ogAclFilter="Extrae las acl de los ficheros de la diferencial"
MSG_HELP_ogAddCmd="Añade comandos al fichero creado por la función ogInstalMiniSetup."
MSG_HELP_ogAddRegistryKey="Añade una nueva clave al registro de Windows."
MSG_HELP_ogAddRegistryValue="Añade un nuevo valor al registro de Windows."
MSG_HELP_ogAddToLaunchDaemon=""
MSG_HELP_ogBoot="Arranca un sistema operativo instalado."
MSG_HELP_ogBootLoaderDeleteEntry="$MSG_DONTUSE."
MSG_HELP_ogBootLoaderHidePartitions="$MSG_DONTUSE."
MSG_HELP_ogBootMbrGeneric=""
MSG_HELP_ogBootMbrXP=""
MSG_HELP_ogBurgDefaultEntry="Configura la entrada por defecto de Burg."
MSG_HELP_ogBurgDeleteEntry="Borra en el Burg del MBR las entradas para el inicio en una particion."
MSG_HELP_ogBurgHidePartitions="Configura el Burg del MBR para que oculte las particiones de windows que no se esten iniciando. Permite definir una partición que no se ocultará (ej: para datos)."
MSG_HELP_ogBurgInstallMbr="Instala el gestor de arranque BURG en el MBR del primer disco duro"
MSG_HELP_ogBurgOgliveDefaultEntry="Configura la entrada de ogLive como la entrada por defecto de Burg."
MSG_HELP_ogCalculateChecksum="Calcula la suma de comprobación (checksum) de un fichero."
MSG_HELP_ogCalculateFullChecksum="Calcula la suma de comprobación completa de un fichero."
MSG_HELP_ogChangeRepo="Cambia el repositorio para el recurso remoto images."
MSG_HELP_ogCheckFs="Comprueba la consistencia de un sistema de archivos."
MSG_HELP_ogCheckIpAddress=""
MSG_HELP_ogCheckProgram=""
MSG_HELP_ogCheckStringInGroup=""
MSG_HELP_ogCheckStringInReg=""
MSG_HELP_ogCheckSyncImage="Muestra el contenido de la imagen para comprobarla."
MSG_HELP_ogCleanLinuxDevices=""
MSG_HELP_ogCleanOs="Elimina los archivos que no son necesarios en el sistema operativo."
MSG_HELP_ogCompareChecksumFiles="Compara si coinciden las sumas de comprobación almacenadas de 2 ficheros."
MSG_HELP_ogConfigureFstab=""
MSG_HELP_ogConfigureOgagent="Configura el nuevo agente OGAgent para sistemas operativos."
MSG_HELP_ogCopyFile="Copia un fichero a otro almacenamiento."
MSG_HELP_ogCreateBootLoaderImage=""
MSG_HELP_ogCreateCache="Reserva espacio para la partición de caché al final del disco."
MSG_HELP_ogCreateDiskImage="Genera una imagen exacta de un disco completo."
MSG_HELP_ogCreateFileImage="Crea/redimensiona el archivo de la imagen sincronizada"
MSG_HELP_ogCreateGptPartitions=""
MSG_HELP_ogCreateImage="Genera una imagen exacta de un sistema operativo instalado localmente."
MSG_HELP_ogCreateImageSyntax=""
MSG_HELP_ogCreateInfoImage="Crea información del contenido de la imagen"
MSG_HELP_ogCreateMbrImage="Genera una imagen del sector de arranque (MBR)."
MSG_HELP_ogCreatePartitions="Define la estructura de particiones de un disco."
MSG_HELP_ogCreatePartitionTable="Genera una tabla de particiones en caso de que no sea valida."
MSG_HELP_ogCreateTorrent=""
MSG_HELP_ogCopyEfiBootLoader="Copia el cargador de arranque desde la partición EFI a la de sistema."
MSG_HELP_ogDeleteCache="Elimina la partición de caché local."
MSG_HELP_ogDeleteFile="Borra un fichero de un espacio de almacenamiento."
MSG_HELP_ogDeletePartitionTable="Elimina la tabla de particiones del disco"
MSG_HELP_ogDeleteRegistryKey="Borra una clave vacía del registro de Windows."
MSG_HELP_ogDeleteRegistryValue="Borra un valor del registro de Windows."
MSG_HELP_ogDeleteTree="Borra un árbol de directorios de un espacio de almacenamiento."
MSG_HELP_ogDevToDisk="Devuelve el nº de orden de disco o de partición correspondiente al camino del fichero de dispositivo."
MSG_HELP_ogDiskToDev="Devuelve el camino del fichero de dispositivo correspondiente al nº de orden de disco o de partición."
MSG_HELP_ogDomainScript=""
MSG_HELP_ogEcho="Muestra un mensaje en pantalla y permite registrarlo en fichero de log"
MSG_HELP_ogExecAndLog="Ejecuta un comando y registra su salida en fichero de log"
MSG_HELP_ogExtendFs="Extiende el tamaño de un sistema de archivo al máximo de su partición."
MSG_HELP_ogFindCache="Indica la partición reservada para caché local."
MSG_HELP_ogFixBootSector=""
MSG_HELP_ogFormatCache="Formatea (inicia) el sistema de caché local."
MSG_HELP_ogFormat="Formatea o reformatea un sistema de archivos."
MSG_HELP_ogFormatFs=$MSG_HELP_ogFormat
MSG_HELP_ogGetArch="Devuelve el tipo de arquitectura del cliente."
MSG_HELP_ogGetCacheSize="Devuelve el tamaño de la partición de caché local."
MSG_HELP_ogGetCacheSpace="Devuelve el espacio máximo disponible que puede ser reservado para la partición de caché local."
MSG_HELP_ogGetCaller="Devuelve el programa o función que llama al actual"
MSG_HELP_ogGetDiskSize="Devuelve el tamaño del disco."
MSG_HELP_ogGetDiskType="Devuelve el mnemónico de tipo de disco."
MSG_HELP_ogGetFreeSize=""
MSG_HELP_ogGetFsSize="Devuelve el tamaño de un sistema de archivos."
MSG_HELP_ogGetFsType="Devuelve el mnemónico de tipo de sistema de archivos."
MSG_HELP_ogGetGroupDir="Devuelve el camino del directorio por defecto para el grupo del cliente."
MSG_HELP_ogGetGroupName="Devuelve el nombre del grupo al que pertenece el cliente."
MSG_HELP_ogGetHivePath="Devuelve el camino completo del fichero de una sección del registro de Windows."
MSG_HELP_ogGetHostname="Devuelve el nombre de la máquina local."
MSG_HELP_ogGetImageCompressor="Devuelve la herramienta de compresión de la imagen."
MSG_HELP_ogGetImageInfo="Muestra información sobre la imagen monolitica: clonacion:compresor:sistemaarchivos:tamañoKB."
MSG_HELP_ogGetImageProgram="Devuelve el programa usado para crear la imagen."
MSG_HELP_ogGetImageSize="Devuelve el tamaño de una imagen de sistema."
MSG_HELP_ogGetImageType="Devuelve el sistema de ficheros de la imagen."
MSG_HELP_ogGetIpAddress="Devuelve la dirección IP del cliente."
MSG_HELP_ogGetLastSector="Devuelve el último sector usable del disco o de una partición."
MSG_HELP_ogGetMacAddress="Devuelve la dirección Ethernet del cliente."
MSG_HELP_ogGetMountImageDir="Devuelve el directorio de montaje de una imagen."
MSG_HELP_ogGetMountPoint="Devuelve el directorio donde está montado un sistema de archivos local."
MSG_HELP_ogGetNetInterface=""
MSG_HELP_ogGetOsType="Devuelve el tipo de un sistema operativo instalado."
MSG_HELP_ogGetOsUuid="Devuelve el UUID de un sistema operativo"
MSG_HELP_ogGetOsVersion="Devuelve el tipo y la versión de un sistema operativo instalado."
MSG_HELP_ogGetParentPath="Devuelve el camino completo del directorio padre de un fichero de sistema OpenGnsys."
MSG_HELP_ogGetPartitionActive="Indica cual es la partición marcada como activa en un disco."
MSG_HELP_ogGetPartitionId="Devuelve el identificador de tipo de una partición."
MSG_HELP_ogGetPartitionSize="Devuelve el tamaño de una partición."
MSG_HELP_ogGetPartitionsNumber="Devuelve el número de particiones de un disco"
MSG_HELP_ogGetPartitionTableType="Devuelve el tipo de tabla de particiones del disco"
MSG_HELP_ogGetPartitionType="Devuelve el mnemónico de tipo de una partición."
MSG_HELP_ogGetPath="Devuelve el camino completo de un fichero de sistema OpenGnsys."
MSG_HELP_ogGetRegistryValue="Devuelve el dato de un valor del registro de Windows."
MSG_HELP_ogGetRepoIp="Devuelve la dirección IP del repositorio de datos."
MSG_HELP_ogGetSerialNumber="Devuelve el número de serie del equipo"
MSG_HELP_ogGetServerIp="Devuelve la dirección IP del servidor principal."
MSG_HELP_ogGetSizeParameters="Devuelve el tamaño de los datos de un sistema de ficheros, el espacio necesario para la imagen y si cabe en el repositorio elegido."
MSG_HELP_ogGetWindowsName="Devuelve el nombre del cliente guardado en el registro de Windows."
MSG_HELP_ogGrubAddOgLive="Incluye en el grub del MBR una entrada llamando al cliente de opengnsys."
MSG_HELP_ogGrubDefaultEntry="Configura la entrada por defecto de GRUB."
MSG_HELP_ogGrubDeleteEntry="Borra en el grub del MBR las entradas para el inicio en una particion."
MSG_HELP_ogGrubHidePartitions="Configura el grub del MBR para que oculte las particiones de windows que no se esten iniciando. Permite definir una partición que no se ocultará (ej: para datos)."
MSG_HELP_ogGrubInstallMbr="Instala el gestor de arranque GRUB en el MBR del primer disco duro"
MSG_HELP_ogGrubInstallPartition="Instala el gestor de arranque GRUB en el BootSector"
MSG_HELP_ogGrubOgliveDefaultEntry="Configura la entrada de ogLive como la entrada por defecto de GRUB."
MSG_HELP_ogGrubSecurity="Configura usuario y clave para modificar las entradas del menu del Grub."
MSG_HELP_ogGrubUefiConf="Genera el fichero grub.cfg de la partición EFI."
MSG_HELP_ogHelp="Muestra mensajes de ayudas para las funciones."
MSG_HELP_ogHidePartition="Oculta una partición de Windows."
MSG_HELP_ogIdToType="Devuelve el mnemónico asociado al identificador de tipo de partición."
MSG_HELP_ogInstallFirstBoot="Crea un archivo que se ejecutará en el primer arranque de Windows."
MSG_HELP_ogInstallLaunchDaemon="Instala un archivo que se ejecutará en el arranque de macOS."
MSG_HELP_ogInstallLinuxClient="$MSG_OBSOLETE."
MSG_HELP_ogInstallMiniSetup="Instala un archivo que se ejecutará en el arranque de Windows."
MSG_HELP_ogInstallRunonce="Crea archivo que se ejecutará en el inicio de un usuario administrador de Windows."
MSG_HELP_ogInstallWindowsClient="$MSG_OBSOLETE."
MSG_HELP_ogIsFormated="Comprueba si un sistema de archivos está formateado."
MSG_HELP_ogIsImageLocked="Comprueba si una imagen está bloqueada por una operación de uso exclusivo."
MSG_HELP_ogIsLocked="Comprueba si una partición o su disco están bloqueados por una operación de uso exclusivo."
MSG_HELP_ogIsDiskLocked="Comprueba si un disco está bloqueado por una operación de uso exclusivo."
MSG_HELP_ogIsMounted="Comprueba si un sistema de archivos está montado."
MSG_HELP_ogIsNewerFile="Comprueba si un fichero es más nuevo (se ha modificado después) que otro."
MSG_HELP_ogIsPartitionLocked=$MSG_HELP_ogIsLocked
MSG_HELP_ogIsRepoLocked=""
MSG_HELP_ogIsSyncImage="Comprueba si la imagen es sincronizable."
MSG_HELP_ogIsVirtualMachine="Comprueba si el cliente es una máquina virtual"
MSG_HELP_ogIsWritable="Comprueba si un sistema de archivos está montado con permiso de escritura."
MSG_HELP_ogLinuxBootParameters="Devuelve los parámetros de arranque de un sistema operativo Linux instalado."
MSG_HELP_ogListHardwareInfo="Lista el inventario de dispositivos del cliente."
MSG_HELP_ogListLogicalPartitions="Lista las particiones lógicas de un disco"
MSG_HELP_ogListPartitions="Lista la estructura de particiones de un disco."
MSG_HELP_ogListPrimaryPartitions="Lista las particiones primarias de un disco"
MSG_HELP_ogListRegistryKeys="Lista los nombres de las subclaves incluidas en una clave del registro de Windows."
MSG_HELP_ogListRegistryValues="Lista los nombres de los valores incluidos en una clave del registro de Windows."
MSG_HELP_ogListSoftware="Lista el inventario de programas instalados en un sistema operativo."
MSG_HELP_ogLock="Bloquea una partición para operación de uso exclusivo."
MSG_HELP_ogLockDisk="Bloquea un disco para operación de uso exclusivo."
MSG_HELP_ogLockImage="Bloquea una imagen para operación de uso exclusivo."
MSG_HELP_ogLockPartition=$MSG_HELP_ogLock
MSG_HELP_ogMakeChecksumFile="Almacena la suma de comprobación de un fichero."
MSG_HELP_ogMakeDir="Crea un directorio para OpenGnsys."
MSG_HELP_ogMakeGroupDir="Crea el directorio de grupo (aula) en un repositorio."
MSG_HELP_ogMcastReceiverFile=""
MSG_HELP_ogMcastReceiverPartition=""
MSG_HELP_ogMcastRequest=""
MSG_HELP_ogMcastSendFile=""
MSG_HELP_ogMcastSendPartition=""
MSG_HELP_ogMcastSyntax=""
MSG_HELP_ogMountCache="Monta el sistema de archivos dedicado a caché local."
MSG_HELP_ogMountCdrom="Monta dispositivo óptico por defecto."
MSG_HELP_ogMountFs=$MSG_HELP_ogMount
MSG_HELP_ogMountImage="Monta una imagen sincronizable"
MSG_HELP_ogMount="Monta un sistema de archivos y devuelve el punto de montaje."
MSG_HELP_ogNvramActiveEntry="Configura a activa entrada del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramAddEntry="Crea nueva entrada del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramDeleteEntry="Borra entrada del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramGetCurrent="Muestra la entrada del gestor de arranque (NVRAM) que ha iniciado el equipo."
MSG_HELP_ogNvramGetNext="Muestra la entrada del gestor de arranque (NVRAM) que se utilizará en el próximo arranque."
MSG_HELP_ogNvramGetOrder="Muestra el orden de las entradas del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramGetTimeout="Muestra el tiempo de espera del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramInactiveEntry="Configura a inactiva entrada del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramList="Lista las entradas del gestor de arranque (NVRAN) marcando con un asterisco las activas"
MSG_HELP_ogNvramPxeFirstEntry="Configura la tarjeta de red como primer arranque en la NVRAM."
MSG_HELP_ogNvramSetNext="Configura el próximo arranque con la entrada del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramSetOrder="Configura el orden de las entradas del gestor de arranque (NVRAM)."
MSG_HELP_ogNvramSetTimeout="Configura el tiempo de espera del gestor de arranque (NVRAM)."
MSG_HELP_ogRaiseError="Muestra y registra mensajes de error y devuelve el código correspondiente."
MSG_HELP_ogReduceFs="Reduce el tamaño del sistema de archivos al mínimo ocupado por sus datos."
MSG_HELP_ogReduceImage="Reduce el tamaño de la imagen"
MSG_HELP_ogRefindDeleteEntry="Borra en rEFInd las entradas para el inicio en una particion."
MSG_HELP_ogRefindDefaultEntry="Configura la entrada por defecto de rEFInd."
MSG_HELP_ogRefindOgliveDefaultEntry="Configura la entrada de ogLive como la entrada por defecto de rEFInd."
MSG_HELP_ogRefindSetTheme="Asigna un tema al rEFInd."
MSG_HELP_ogRefindSetTimeOut="Define el tiempo (segundos) que se muestran las opciones de inicio de rEFInd."
MSG_HELP_ogRefindSetResolution="Define la resolución que usuará el thema del gestor de arranque rEFInd."
MSG_HELP_ogRefindInstall="Instala y configura el gestor rEFInd en la particion EFI"
MSG_HELP_ogRestoreAclImage="Restaura las ACL de Windows (La informacion debe estar copiada en /tmp)."
MSG_HELP_ogRestoreBootLoaderImage=""
MSG_HELP_ogRestoreDiskImage="Restaura una imagen de un disco completo."
MSG_HELP_ogRestoreEfiBootLoader="Copia el cargador de arranque de la partición de sistema a la partición EFI."
MSG_HELP_ogRestoreImage="Restaura una imagen de sistema operativo."
MSG_HELP_ogRestoreInfoImage="Restablece información del sistema: ACL y enlaces simbolicos"
MSG_HELP_ogRestoreMbrImage="Restaura una imagen del sector de arranque (MBR)."
MSG_HELP_ogRestoreUuidPartitions="Restaura los uuid de las particiones y la tabla de particiones."
MSG_HELP_ogSaveImageInfo="Crea un fichero con la información de la imagen."
MSG_HELP_ogSetLinuxName=""
MSG_HELP_ogSetPartitionActive="Establece el número de partición activa de un disco."
MSG_HELP_ogSetPartitionId="Modifica el tipo de una partición física usando el mnemónico del tipo."
MSG_HELP_ogSetPartitionSize="Establece el tamaño de una partición."
MSG_HELP_ogSetPartitionType="Modifica el identificador de tipo de una partición física."
MSG_HELP_ogSetRegistryValue="Asigna un dato a un valor del registro de Windows."
MSG_HELP_ogSetWindowsName="Asigna el nombre del cliente en el registro de Windows."
MSG_HELP_ogSetWinlogonUser="Asigna el nombre de usuario por defecto para el gestor de entrada de Windows."
MSG_HELP_ogSyncCreate="Sincroniza los datos de la partición a la imagen"
MSG_HELP_ogSyncRestore="Sincroniza los datos de la imagen a la partición"
MSG_HELP_ogTorrentStart=""
MSG_HELP_ogTypeToId="Devuelve el identificador asociado al mnemónico de tipo de partición."
MSG_HELP_ogUcastReceiverPartition=""
MSG_HELP_ogUcastSendFile=""
MSG_HELP_ogUcastSendPartition=""
MSG_HELP_ogUcastSyntax=""
MSG_HELP_ogUnhidePartition="Hace visible una partición de Windows."
MSG_HELP_ogUninstallLinuxClient="Desinstala el antiguo cliente OpenGnSys en un sistema operativo Linux."
MSG_HELP_ogUninstallWindowsClient="Desinstala el antiguo cliente OpenGnSys en un sistema operativo Windows."
MSG_HELP_ogUnlock="Desbloquea una partición tras finalizar una operación de uso exclusivo."
MSG_HELP_ogUnlockDisk="Desbloquea un disco tras finalizar una operación de uso exclusivo."
MSG_HELP_ogUnlockImage="Desbloquea una imagen tras finalizar una operación de uso exclusivo."
MSG_HELP_ogUnlockPartition=$MSG_HELP_ogUnlock
MSG_HELP_ogUnmountAll="Desmonta todos los sistemas de archivos."
MSG_HELP_ogUnmountCache="Desmonta el sistema de archivos de caché local."
MSG_HELP_ogUnmount="Desmonta un sistema de archivos."
MSG_HELP_ogUnmountFs=$MSG_HELP_ogUnmount
MSG_HELP_ogUnmountImage="Desmonta la imagen."
MSG_HELP_ogUnsetDirtyBit=""
MSG_HELP_ogUpdateCacheIsNecesary="Comprueba si es necesario actualizar una archivo en la cache local."
MSG_HELP_ogUpdatePartitionTable="Actualiza información de la tabla de particiones del disco."
MSG_HELP_ogUuidChange="Reemplaza el UUID de un sistema de ficheros."
MSG_HELP_ogWaitSyncImage=""
MSG_HELP_ogWindowsBootParameters=""
MSG_HELP_ogWindowsRegisterPartition=""
# Scripts
MSG_HELP_configureOs="Post-configura de arranque del sistema"
MSG_HELP_createBaseImage="Genera imagen básica de la partición"
MSG_HELP_createDiffImage="Genera imagen diferencial de la partición respecto a la imagen básica"
MSG_HELP_installOfflineMode="Prepara el equipo cliente para el modo offline."
MSG_HELP_partclone2sync="Convierte imagen de partclone en imagen sincronizable."
MSG_HELP_restoreBaseImage="Restaura una imagen básica en una partición"
MSG_HELP_restoreDiffImage="Restaura una imagen diferencial en una partición"
MSG_HELP_updateCache="Realiza la actualización de la caché"
# Mensajes de descripción breve de la interfaz.
MSG_INTERFACE_START="[START Interface] Ejecutar comando: "
MSG_INTERFACE_END="[END Interface] Comando terminado con este código: "
# Mensajes de scripts.
MSG_SCRIPTS_START=" INICIO scripts: "
MSG_SCRIPTS_END=" FIN scripts: "
MSG_SCRIPTS_TASK_END="Fin de la tarea"
MSG_SCRIPTS_TASK_SLEEP="Esperando para iniciar"
MSG_SCRIPTS_TASK_START="Iniciando"
MSG_SCRIPTS_TASK_ERR="Error"
# Script createImage.
MSG_SCRIPTS_FILE_RENAME=" Renombrar fichero-imagen previo: "
MSG_SCRIPTS_CREATE_SIZE=" Calcular espacio (KB) requerido para almacenarlo y el disponible: "
# Script updateCache.
MSG_SCRIPTS_UPDATECACHE_DOUPDATE="Comprobar si es necesario actualizar el fichero imagen "
MSG_SCRIPTS_UPDATECACHE_CHECKSIZECACHE="Comprobar que el tamaño de la caché es mayor que el fichero a descargar."
# Script updateCache: para las imágenes sincronizadas tipo dir.
MSG_SCRIPTS_UPDATECACHE_CHECKSIZEDIR="Calcular el tamaño de la imagen."
MSG_SCRIPTS_UPDATECACHE_CHECKSIZEIMG="Comprobar si la imagen del repositorio es mayor que la de la caché."
MSG_SCRIPTS_UPDATECACHE_IFNOTCACHEDO="Comprobar el espacio libre de la caché y actuar según engine.cfg"
MSG_SCRIPTS_UPDATECACHE_CHECKMCASTSESSION="Comprobando sesión Multicast: ServidorMcast:PuertoDatos"
# interface sustituye temporalmente al scritp restore
MSG_SCRIPTS_CHECK_ENGINE="Analizar proceso a realizar según engine.cfg"
MSG_SCRIPTS_MULTICAST_PRECHECK_PORT="Determinar puerto principal y auxiliar Multicast."
MSG_SCRIPTS_MULTICAST_CHECK_PORT="Comprobar puertos de sesión y datos"
MSG_SCRIPTS_MULTICAST_REQUEST_PORT="Solicitar la apertura: "
MSG_SCRIPTS_OS_CONFIGURE="Iniciar la configuración del sistema restaurado"
# TIME MESSAGES
MSG_SCRIPTS_TIME_TOTAL="tiempo total del proceso"
MSG_SCRIPTS_TIME_PARTIAL="tiempo parcial del subproceso"
# HTTPLOG
MSG_HTTPLOG_NOUSE="No apague este ordenador por favor"
# Mensajes sincronizadas
MSG_SYNC_RESIZE="Redimensiona la imagen al tamaño necesario"
MSG_SYNC_RESTORE="Trae el listado ficheros y baja la imagen"
MSG_SYNC_DELETE="Diferencial: Borra archivos antiguos"
MSG_SYNC_SLEEP="Espera que se monte/reduzca la imagen"
# Mensajes sincronizadas complementarios a errores
MSG_SYNC_DIFFERENTFS="El sistema de ficheros de destino no coincide con el de la imagen"
MSG_SYNC_EXTENSION="Las extensiones de la imagenes deben ser img o diff"
MSG_SYNC_NOCHECK="La imagen esta montada por otro proceso, no podemos comprobarla"
MSG_RESTORE="Restaura la imagen en"

View File

@ -0,0 +1,25 @@
#!/bin/bash
# Cargar entorno de OpenGnsys
set -a
source /opt/opengnsys/etc/preinit/loadenviron.sh
# Scripts de inicio.
for f in fileslinks loadmodules metadevs mountrepo poweroff otherservices; do
$OGETC/preinit/$f.sh
done
unset f
if [ -f $OGETC/init/$IPV4ADDR.sh ]; then
$OGETC/init/$OG_IP.sh
elif [ -f $OGETC/init/$OGGROUP.sh ]; then
$OGETC/init/$OGGROUP.sh
elif [ -f $OGETC/init/default.sh ]; then
$OGETC/init/default.sh
else
echo "No se ha encontrado script de inicio"
halt
fi

View File

@ -0,0 +1,53 @@
#!/bin/bash
#/**
#@file fileslinks.sh
#@brief Script de inicio para copiar ficheros y deinir enlaces simbólicos.
#@warning License: GNU GPLv3+
#@version 0.9
#@author Ramon Gomez, ETSII Universidad de Sevilla
#@date 2009-10-10
#@version 1.0.5 - Enlace para librería libmac (obsoleto en versión 1.1.1).
#@author Ramon Gomez, ETSII Universidad de Sevilla
#@date 2012-06-28
#@version 1.1.2 - Autenticación con clave pública para SSH
#@author Irina Gómez, ETSII Universidad de Sevilla
#@date 2019-09-25
#*/
# Si está configurado OpenGnsys ...
if [ -n "$OPENGNSYS" ]; then
echo "${MSG_MAKELINKS:-.}"
# Shell BASH por defecto (para usar "runtest")
ln -fs /bin/bash /bin/sh 2>/dev/null
# Crear directorio de bloqueos
mkdir -p /var/lock 2>/dev/null || mkdir -p /run/lock
# Crear ficheros temporales.
touch $OGLOGCOMMAND $OGLOGCOMMAND.tmp $OGLOGSESSION /tmp/menu.tmp
chmod 777 $OGLOGCOMMAND $OGLOGCOMMAND.tmp $OGLOGSESSION /tmp/menu.tmp
# Enlaces para Qt Embeded.
QTDIR="/usr/local"
mkdir -p $QTDIR/{etc,lib,plugins}
for i in $OGLIB/qtlib/* $OGLIB/fonts; do
[ -f $QTDIR/lib/$i ] || ln -fs $i $QTDIR/lib 2>/dev/null
done
for i in $OGLIB/qtplugins/*; do
[ -f $QTDIR/plugins/$i ] || ln -fs $i $QTDIR/plugins 2>/dev/null
done
for i in $OGETC/*.qmap; do
[ -f $QTDIR/etc/$i ] || ln -fs $i $QTDIR/etc 2>/dev/null
done
# Autenticación con clave pública para SSH
[ -f /scripts/ssl/authorized_keys ] && cp /scripts/ssl/* /root/.ssh
else
# FIXME Error: entorno de OpenGnsys no configurado.
echo "Error: OpenGnsys environment is not configured." # FIXME: definir mensaje.
exit 1
fi

View File

@ -0,0 +1,150 @@
#!/bin/bash
#/**
#@file loadenviron.sh
#@brief Script de carga de la API de funciones de OpenGnsys.
#@warning License: GNU GPLv3+
#@version 0.9
#@author Ramon Gomez, ETSII Universidad de Sevilla
#@date 2009-10-10
#@version 1.0.3 - Limpiar código y configuración modo off-line
#@author Ramon Gomez, ETSII Universidad de Sevilla
#@date 2012-01-12
#@version 1.0.5 - Compatibilidad para usar proxy y servidor DNS.
#@author Ramon Gomez, ETSII Universidad de Sevilla
#@date 2014-04-23
#*/
# Idioma por defecto.
export LANG="${LANG:-es_ES}"
locale-gen $LANG
# Directorios del proyecto OpenGnsys.
export OPENGNSYS="${OPENGNSYS:-/opt/opengnsys}"
if [ -d $OPENGNSYS ]; then
export OGBIN=$OPENGNSYS/bin
export OGETC=$OPENGNSYS/etc
export OGLIB=$OPENGNSYS/lib
export OGAPI=$OGLIB/engine/bin
export OGPYFUNCS=$OPENGNSYS/functions
export OGSCRIPTS=$OPENGNSYS/scripts
export OGIMG=$OPENGNSYS/images
export OGCAC=$OPENGNSYS/cache
export OGLOG=$OPENGNSYS/log
export PATH=$OGSCRIPTS:$OGPYFUNCS:$OGBIN:$PATH:/opt/oglive/rootfs/opt/drbl/sbin
export PYTHONPATH=$OPENGNSYS/lib/python3
# Exportar parámetros del kernel.
for i in $(cat /proc/cmdline); do
echo $i | grep -q "=" && export $i
done
# Cargar sysctls
sysctl -p &>/dev/null
# Cargar fichero de idioma.
LANGFILE=$OGETC/lang.${LANG%@*}.conf
if [ -f $LANGFILE ]; then
source $LANGFILE
for i in $(awk -F= '{if (NF==2) print $1}' $LANGFILE); do
export $i
done
fi
# Mensaje de carga del entorno.
echo "${MSG_LOADAPI:-.}"
# Cargar mapa de teclado.
loadkeys ${LANG%_*} >/dev/null
# Cargar API de funciones.
for i in $OGAPI/*.lib; do
source $i
done
for i in $(typeset -F | cut -f3 -d" "); do
export -f $i
done
# Cargar configuración del engine.
[ -f ${OGETC}/engine.cfg ] && source ${OGETC}/engine.cfg
export OGLOGCOMMAND=${OGLOGCOMMAND:-/tmp/command.log}
export OGLOGSESSION=${OGLOGSESSION:-/tmp/session.log}
# Cargar las APIs según engine.
if [ -n "$ogengine" ]; then
for i in $OGAPI/*.$ogengine; do
[ -f $i ] && source $i
done
fi
# Configuración de la red (modo offline).
eval $(grep "^DEVICECFG=" /tmp/initrd.cfg 2>/dev/null)
if [ -n "$DEVICECFG" ]; then
export DEVICECFG
[ -f $DEVICECFG ] && source $DEVICECFG
fi
# FIXME Pruebas para grupos de ordenadores
export OGGROUP="$group"
ROOTREPO=${ROOTREPO:-"$OGSERVERIMAGES"}
# Fichero de registros.
export OGLOGFILE="$OGLOG/$(ogGetIpAddress).log"
fi
# Compatibilidad para usar proxy en clientes ogLive.
[ -z "$http_proxy" -a -n "$ogproxy" ] && export http_proxy="$ogproxy"
# Compatibilidad para usar servidor DNS en clientes ogLive.
if [ ! -f /run/resolvconf/resolv.conf -a -n "$ogdns" ]; then
mkdir -p /run/resolvconf
echo "nameserver $ogdns" > /run/resolvconf/resolv.conf
fi
# Declaración de códigos de error.
export OG_ERR_FORMAT=1 # Formato de ejecución incorrecto.
export OG_ERR_NOTFOUND=2 # Fichero o dispositivo no encontrado.
export OG_ERR_PARTITION=3 # Error en partición de disco.
export OG_ERR_LOCKED=4 # Partición o fichero bloqueado.
export OG_ERR_IMAGE=5 # Error al crear o restaurar una imagen.
export OG_ERR_NOTOS=6 # Sin sistema operativo.
export OG_ERR_NOTEXEC=7 # Programa o función no ejecutable.
# Códigos 8-13 reservados por ogAdmClient.h
export OG_ERR_NOTWRITE=14 # No hay acceso de escritura
export OG_ERR_NOTCACHE=15 # No hay particion cache en cliente
export OG_ERR_CACHESIZE=16 # No hay espacio en la cache para almacenar fichero-imagen
export OG_ERR_REDUCEFS=17 # Error al reducir sistema archivos
export OG_ERR_EXTENDFS=18 # Error al expandir el sistema de archivos
export OG_ERR_OUTOFLIMIT=19 # Valor fuera de rango o no válido.
export OG_ERR_FILESYS=20 # Sistema de archivos desconocido o no se puede montar
export OG_ERR_CACHE=21 # Error en partición de caché local
export OG_ERR_NOGPT=22 # El disco indicado no contiene una particion GPT
export OG_ERR_REPO=23 # Error al montar el repositorio de imagenes
export OG_ERR_NOMSDOS=24 # El disco indicado no contienen una particion MSDOS
export OG_ERR_IMGSIZEPARTITION=30 # Error al restaurar partición más pequeña que la imagen
export OG_ERR_UPDATECACHE=31 # Error al realizar el comando updateCache
export OG_ERR_DONTFORMAT=32 # Error al formatear
export OG_ERR_IMAGEFILE=33 # Archivo de imagen corrupto o de otra versión de $IMGPROG
export OG_ERR_GENERIC=40 # Error imprevisto no definido
export OG_ERR_UCASTSYNTAXT=50 # Error en la generación de sintaxis de transferenica UNICAST
export OG_ERR_UCASTSENDPARTITION=51 # Error en envío UNICAST de partición
export OG_ERR_UCASTSENDFILE=52 # Error en envío UNICAST de un fichero
export OG_ERR_UCASTRECEIVERPARTITION=53 # Error en la recepcion UNICAST de una particion
export OG_ERR_UCASTRECEIVERFILE=54 # Error en la recepcion UNICAST de un fichero
export OG_ERR_MCASTSYNTAXT=55 # Error en la generacion de sintaxis de transferenica Multicast.
export OG_ERR_MCASTSENDFILE=56 # Error en envio MULTICAST de un fichero
export OG_ERR_MCASTRECEIVERFILE=57 # Error en la recepcion MULTICAST de un fichero
export OG_ERR_MCASTSENDPARTITION=58 # Error en envio MULTICAST de una particion
export OG_ERR_MCASTRECEIVERPARTITION=59 # Error en la recepcion MULTICAST de una particion
export OG_ERR_PROTOCOLJOINMASTER=60 # Error en la conexion de una sesion UNICAST|MULTICAST con el MASTER
export OG_ERR_DONTMOUNT_IMAGE=70 # Error al montar una imagen sincronizada.
export OG_ERR_DONTSYNC_IMAGE=71 # Imagen no sincronizable (es monolitica)
export OG_ERR_DONTUNMOUNT_IMAGE=72 # Error al desmontar la imagen
export OG_ERR_NOTDIFFERENT=73 # No se detectan diferencias entre la imagen basica y la particion.
export OG_ERR_SYNCHRONIZING=74 # Error al sincronizar, puede afectar la creacion/restauracion de la imagen
export OG_ERR_NOTUEFI=80 # La interfaz UEFI no está activa
export OG_ERR_NOTBIOS=81 # La interfaz BIOS legacy no está activa

View File

@ -0,0 +1,23 @@
#!/bin/bash
#/**
#@file loadmodules.sh
#@brief Script de inicio para cargar módulos complementarios del kernel.
#@version 1.0
#@author Ramon Gomez, ETSII Universidad de Sevilla
#@date 2010-01-26
#@version 1.0.5 - Cargar módulos específicos para el cliente.
#@author Ramon Gomez, ETSII Universidad de Sevilla
#@date 2013-11-11
#*/
echo "${MSG_LOADMODULES:-.}"
# Módulo del ratón.
modprobe psmouse 2>/dev/null
# Cargar módulos específicos del kernel del cliente.
for m in $OGLIB/modules/$(uname -r)/*.ko; do
[ -r $m ] && insmod $m &>/dev/null
done

View File

@ -0,0 +1,28 @@
#!/bin/bash
#/**
#@file metadevs.sh
#@brief Script de inicio para detectar metadispositivos LVM y RAID.
#@note Desglose del script "loadenviron.sh".
#@warning License: GNU GPLv3+
#@version 0.9
#@author Ramon Gomez, ETSII Universidad de Sevilla
#@date 2009-10-10
#@version 0.9.4
#@author Ramon Gomez, ETSII Universidad de Sevilla
#@date 2010-04-19
#*/
# Si está configurado OpenGnsys ...
if [ -n "$OPENGNSYS" ]; then
echo "$MSG_DETECTLVMRAID"
# Detectar metadispositivos LVM.
vgchange -ay &>/dev/null
# Detectar metadispositivos RAID.
dmraid -ay &>/dev/null
else
# FIXME Error: entorno de OpenGnsys no configurado.
echo "Error: OpenGnsys environment is not configured." # FIXME: definir mensaje.
exit 1
fi

View File

@ -0,0 +1,54 @@
#!/bin/bash
#/**
#@file mountrepo.sh
#@brief Script para montar el repositorio de datos remoto.
#@warning License: GNU GPLv3+
#@version 1.0
#@author Ramon Gomez, ETSII Universidad de Sevilla
#@date 2011-03-17
#*/
OGIMG=${OGIMG:-/opt/opengnsys/images}
ROOTREPO=${ROOTREPO:-"$ROOTSERVER"}
# TODO Revisar proceso de arranque para no montar 2 veces el repositorio.
if [ "$ogactiveadmin" == "true" ]; then
export boot=admin # ATENCIÓN: siempre en modo "admin".
umount $OGIMG 2>/dev/null
protocol=${ogprotocol:-"smb"}
[ "$ogunit" != "" ] && OGUNIT="/$ogunit"
printf "$MSG_MOUNTREPO\n" "$protocol" "$boot"
case "$ogprotocol" in
nfs) mount.nfs ${ROOTREPO}:$OGIMG$OGUNIT $OGIMG -o rw,nolock ;;
smb) PASS=$(grep "^[ ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 | \
sed 's/\(.*\)pass=\(\w*\)\(.*\)/\2/')
PASS=${PASS:-"og"}
mount.cifs //${ROOTREPO}/ogimages$OGUNIT $OGIMG -o rw,serverino,acl,username=opengnsys,password=$PASS
;;
local) # TODO: hacer funcion dentro de este script que monte smb
# Comprobamos que estatus sea online.
if [ "$ogstatus" == "offline" -o "$SERVER" == "" ]; then
# Si estatus es offline buscamos un dispositivo con etiqueta repo
# y si no existe montamos la cache como repo (si existe).
TYPE=$(blkid | grep REPO | awk -F"TYPE=" '{print $2}' | tr -d \")
if [ "$TYPE" == "" ]; then
[ -d $OGCAC/$OGIMG ] && mount --bind $OGCAC/$OGIMG $OGIMG
else
mount -t $TYPE LABEL=REPO $OGIMG &>/dev/null
fi
else
# Comprobamos que existe un servicio de samba.
smbclient -L $SERVER -N &>/dev/null
if [ $? -eq 0 ]; then
PASS=$(grep "^[ ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 | \
sed 's/\(.*\)pass=\(\w*\)\(.*\)/\2/')
PASS=${PASS:-"og"}
mount.cifs //${ROOTREPO}/ogimages $OGIMG -o rw,serverino,acl,username=opengnsys,password=$PASS
fi
# TODO: buscar condicion para NFS
fi
;;
esac
fi

View File

@ -0,0 +1,38 @@
#!/bin/bash
#/**
#@file otherservices.sh
#@brief Script de inicio para cargar otros servicios complementarios.
#@version 1.0.3
#@author Ramon Gomez, ETSII Universidad de Sevilla
#@date 2012-01-12
#*/
# Montar efivar filesystem
ogIsEfiActive && mount -t efivarfs none /sys/firmware/efi/efivars
# Lanzar servicios complementarios del cliente.
echo "${MSG_OTHERSERVICES:-.}"
# Iniciar rsyslog, si es necesario.
[ -S /dev/log ] || service rsyslog start
# Adpatar la clave de "root" para acceso SSH.
PASS=$(grep "^[ ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 | \
sed 's/\(.*\)pass=\(\w*\)\(.*\)/\2/')
PASS=${PASS:-"og"}
echo -ne "$PASS\n$PASS\n" | passwd root 2>/dev/null
# Cargar el entorno OpenGnsys en conexión SSH.
cp -a $OPENGNSYS/etc/preinit/loadenviron.sh /etc/profile.d/
# Arrancar SSH.
/etc/init.d/ssh start &>/dev/null
# Desactivado apagado de monitor.
#setterm -blank 0 -powersave off -powerdown 0 < /dev/console > /dev/console 2>&1
# Activado WOL en la interfaz usada en arranque PXE.
ethtool -s $DEVICE wol g 2>/dev/null
# TODO Localizar correctamente el script de arranque.
[ -f /opt/opengnsys/scripts/runhttplog.sh ] && /opt/opengnsys/scripts/runhttplog.sh 2>/dev/null

View File

@ -0,0 +1,40 @@
#!/bin/bash
#/**
#@file poweroff.sh
#@brief Script de inicio para cargar el proceso comprobación de clientes inactivos.
#@note Arranca y configura el proceso "cron".
#@warning License: GNU GPLv3+
#@version 1.0.2
#@author Ramon Gomez, ETSII Universidad de Sevilla
#@date 2011-10-25
#*/
# Si está configurado OpenGnsys ...
if [ -n "$OPENGNSYS" ]; then
echo "${MSG_POWEROFFCONF:-.}"
# Sincronización horaria con servidor NTP.
[ -n "$ogntp" -a "$status" != "offline" ] && ntpdate $ogntp
# Crear fichero de configuración por defecto (30 min. de espera).
POWEROFFCONF=/etc/poweroff.conf
cat << FIN > $POWEROFFCONF
POWEROFFSLEEP=30
POWEROFFTIME=
FIN
# Incluir zona horaria en el fichero de configuración.
awk 'BEGIN {RS=" "} /^TZ=/ {print}' /proc/cmdline >> $POWEROFFCONF
# Lanzar el proceso "cron".
cron -l
# Definir la "crontab" lanzando el proceso de comprobación cada minuto.
echo "* * * * * [ -x $OGBIN/poweroffconf ] && $OGBIN/poweroffconf" | crontab -
else
# FIXME Error: entorno de OpenGnsys no configurado.
echo "Error: OpenGnsys environment is not configured." # FIXME: definir mensaje.
exit 1
fi

Some files were not shown because too many files have changed in this diff Show More