From 9ac7993836bae8af878b65e86a994cdaf22bd078 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Thu, 14 Jun 2018 11:25:35 +0000 Subject: #770 imagenes.php: Se corrige errata en consulta SQL por la que no se mostraban las imágenes diferenciales MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/WebConsole/principal/imagenes.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/admin/WebConsole/principal/imagenes.php b/admin/WebConsole/principal/imagenes.php index ac358491..7c0a123c 100644 --- a/admin/WebConsole/principal/imagenes.php +++ b/admin/WebConsole/principal/imagenes.php @@ -237,9 +237,16 @@ function SubarbolXML_Imagenes($grupoid,$amb,$litamb,$tipo) $rs=new Recordset; #### agp ### Añado la consulta el campo idrepositorio #### $cmd->texto="SELECT DISTINCT imagenes.idimagen,imagenes.descripcion,repositorios.nombrerepositorio,repositorios.ip - FROM imagenes INNER JOIN repositorios USING (idrepositorio) - WHERE imagenes.idrepositorio = repositorios.idrepositorio - AND imagenes.idcentro=".$idcentro." + FROM imagenes "; + // Para hallar el repositorio de las incrementales hay que buscar los datos de la imagen basica (en la propia tablas imágenes) + if ($tipo == 3) { + $cmd->texto.=" INNER JOIN imagenes AS basica INNER JOIN repositorios + WHERE basica.idrepositorio=repositorios.idrepositorio + AND imagenes.imagenid=basica.idimagen AND "; + } else { + $cmd->texto.=" INNER JOIN repositorios USING (idrepositorio) WHERE "; + } + $cmd->texto.=" imagenes.idcentro=".$idcentro." AND imagenes.grupoid=".$grupoid." AND imagenes.tipo=".$tipo." ORDER BY imagenes.descripcion"; -- cgit v1.2.3-18-g5258 From cc3fea5c40810511ddc068a14759535d939130ee Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Tue, 19 Jun 2018 08:22:10 +0000 Subject: #842 Consola: se revisan todos los ficheros de javascript de idioma en inglés. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../idiomas/javascripts/eng/acciones_eng.js | 12 +++---- .../idiomas/javascripts/eng/accionmenu_eng.js | 18 +++++----- .../javascripts/eng/administradores_centros_eng.js | 8 ++--- .../eng/administradores_usuarios_eng.js | 8 ++--- .../idiomas/javascripts/eng/asistentes_eng.js | 10 +++--- .../idiomas/javascripts/eng/aulas_eng.js | 32 ++++++++--------- .../idiomas/javascripts/eng/colasacciones_eng.js | 34 +++++++++--------- .../eng/comandos/comunescomandos_eng.js | 41 +++++++++++----------- .../javascripts/eng/comandos/configurar_eng.js | 24 ++++++------- .../javascripts/eng/comandos/crearimagen_eng.js | 8 ++--- .../eng/comandos/crearimagenbasica_eng.js | 10 +++--- .../eng/comandos/crearperfilsoftware_eng.js | 4 +-- .../eng/comandos/crearsoftincremental_eng.js | 11 +++--- .../eng/comandos/ejecutarscripts_eng.js | 14 ++++---- .../eng/comandos/eliminarimagencache_eng.js | 4 +-- .../javascripts/eng/comandos/enviarmensaje_eng.js | 8 ++--- .../javascripts/eng/comandos/iniciarsesion_eng.js | 6 ++-- .../eng/comandos/inventariosoftware_eng.js | 4 +-- .../eng/comandos/particionaryformatear_eng.js | 22 ++++++------ .../eng/comandos/restaurarimagen_eng.js | 22 ++++++------ .../eng/comandos/restaurarimagenbasica_eng.js | 18 +++++----- .../eng/comandos/restaurarsoftincremental_eng.js | 18 +++++----- .../idiomas/javascripts/eng/comunes_eng.js | 24 ++++++------- .../idiomas/javascripts/eng/consolaremota_eng.js | 10 +++--- .../javascripts/eng/ejecutaracciones_eng.js | 11 +++--- .../javascripts/eng/ejecutarprocedimientos_eng.js | 8 ++--- .../idiomas/javascripts/eng/hardwares_eng.js | 5 ++- .../idiomas/javascripts/eng/iconos_eng.js | 6 ++-- .../idiomas/javascripts/eng/imagenes_eng.js | 5 ++- .../javascripts/eng/imagenincremental_eng.js | 8 ++--- .../javascripts/eng/inclusionacciones_eng.js | 11 +++--- .../eng/incrementalcomponente_soft_eng.js | 8 ++--- .../javascripts/eng/informacion_menus_eng.js | 10 +++--- .../idiomas/javascripts/eng/menus_eng.js | 5 ++- .../javascripts/eng/perfilcomponente_hard_eng.js | 8 ++--- .../javascripts/eng/perfilcomponente_soft_eng.js | 8 ++--- .../javascripts/eng/procedimientoscomandos_eng.js | 12 +++---- .../idiomas/javascripts/eng/programaciones_eng.js | 36 +++++++++---------- .../javascripts/eng/propiedades_aulas_eng.js | 34 +++++++++--------- .../javascripts/eng/propiedades_centros_eng.js | 13 ++++--- .../eng/propiedades_componentehardwares_eng.js | 10 +++--- .../eng/propiedades_componentesoftwares_eng.js | 12 +++---- .../javascripts/eng/propiedades_entidades_eng.js | 12 +++---- .../javascripts/eng/propiedades_grupos_eng.js | 6 ++-- .../javascripts/eng/propiedades_imagenes_eng.js | 18 ++++++---- .../javascripts/eng/propiedades_menus_eng.js | 10 +++--- .../javascripts/eng/propiedades_ordenadores_eng.js | 16 ++++----- .../eng/propiedades_perfilhardwares_eng.js | 8 ++--- .../eng/propiedades_perfilsoftwares_eng.js | 8 ++--- .../eng/propiedades_procedimientos_eng.js | 6 ++-- .../eng/propiedades_repositorios_eng.js | 14 ++++---- .../javascripts/eng/propiedades_reservas_eng.js | 14 ++++---- .../eng/propiedades_softincrementales_eng.js | 6 ++-- .../javascripts/eng/propiedades_tareas_eng.js | 8 +++-- .../eng/propiedades_tipohardwares_eng.js | 7 ++-- .../javascripts/eng/propiedades_trabajos_eng.js | 6 ++-- .../eng/propiedades_universidades_eng.js | 6 ++-- .../javascripts/eng/propiedades_usuarios_eng.js | 18 +++++----- .../idiomas/javascripts/eng/reservas_eng.js | 5 ++- .../idiomas/javascripts/eng/softwares_eng.js | 4 +-- .../idiomas/javascripts/eng/tareascomandos_eng.js | 10 +++--- .../idiomas/javascripts/eng/trabajostareas_eng.js | 12 +++---- 62 files changed, 387 insertions(+), 387 deletions(-) diff --git a/admin/WebConsole/idiomas/javascripts/eng/acciones_eng.js b/admin/WebConsole/idiomas/javascripts/eng/acciones_eng.js index 3e230582..f1fa153f 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/acciones_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/acciones_eng.js @@ -1,10 +1,10 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: acciones_eng.js -// Idioma: Ings +// Javascript language file: acciones_eng.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="WARNING.- This task will be performed. Are you sure ?"; -TbMsg[1]="WARNING.- This job will be performed. Are you sure ?"; -TbMsg[2]="This task has been successfully initiated"; -TbMsg[3]="This job has been successfully initiated"; +TbMsg[0]="WARNING.- This task will be executed. Are you sure?"; +TbMsg[1]="WARNING.- This job will be executed. Are you sure?"; +TbMsg[2]="This task has been executed successfully "; +TbMsg[3]="This job has been executed successfully"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/accionmenu_eng.js b/admin/WebConsole/idiomas/javascripts/eng/accionmenu_eng.js index 51d2550d..e190705f 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/accionmenu_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/accionmenu_eng.js @@ -1,13 +1,11 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: accionmenu_eng.js -// Idioma: Ings -//________________________________________________________________________________________________________ +// Javascript language file: accionmenu_eng.js +// Language: English +//____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="WARNING: You must introduce an item description"; -TbMsg[1]="WARNING: You must introduce an order number"; -TbMsg[2]="This item has been successfully included in this menu"; -TbMsg[3]="This item has been successfully excluded from this menu"; -TbMsg[4]="This item has been successfully modified"; - - +TbMsg[0]="WARNING: You must enter an item description"; +TbMsg[1]="WARNING: You must enter an order number"; +TbMsg[2]="This item has been included successfully in this menu"; +TbMsg[3]="This item has been excluded successfully from this menu"; +TbMsg[4]="This item has been modified successfully"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/administradores_centros_eng.js b/admin/WebConsole/idiomas/javascripts/eng/administradores_centros_eng.js index 5271887d..225a7897 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/administradores_centros_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/administradores_centros_eng.js @@ -1,8 +1,8 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: administradores_centros_eng.js -// Idioma: Ingles +// Javascript language file: administradores_centros_eng.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="The Administrator has been included in this Organizational Unit correctly"; -TbMsg[1]="This Administrator has properly been excluded from this Organizational Unit"; +TbMsg[0]="This Administrator has been included successfully in this Organizational Unit"; +TbMsg[1]="This Administrator has been excluded successfully from this Organizational Unit"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/administradores_usuarios_eng.js b/admin/WebConsole/idiomas/javascripts/eng/administradores_usuarios_eng.js index 793df1b7..c979eb1d 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/administradores_usuarios_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/administradores_usuarios_eng.js @@ -1,8 +1,8 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: administradores_usuarios_eng.js -// Idioma: Ingles +// Javascript language file: administradores_usuarios_eng.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="The Organizational Unit has been properly assigned to User"; -TbMsg[1]="The Organizational Unit has been properly excluded from this User"; +TbMsg[0]="The Organizational Unit has been assigned successfully to this User"; +TbMsg[1]="The Organizational Unit has been excluded successfully from this User"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/asistentes_eng.js b/admin/WebConsole/idiomas/javascripts/eng/asistentes_eng.js index c6bcd421..336ebbb8 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/asistentes_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/asistentes_eng.js @@ -1,10 +1,10 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: asistentes.js -// Idioma: Inglés -//________________________________________________________________________________________________________ +// Javascript language file: asistentes.js +// Language: English +//____________________________________________________________________________ TbMsg=new Array; // Asistente de particionado -TbMsg["NOCACHESIZE"] = "¡El espacio libre en disco es menor que la cache!"; -TbMsg["NODISKSIZE"] = "¡El espacio libre en disco no puede ser menor que 0!"; +TbMsg["NOCACHESIZE"] = "Free disk space is smaller than cache!"; +TbMsg["NODISKSIZE"] = "Free disk space cannot be lower than zero!"; TbMsg["NOSUPPORT"] = "Este navegador no soporta la operación."; diff --git a/admin/WebConsole/idiomas/javascripts/eng/aulas_eng.js b/admin/WebConsole/idiomas/javascripts/eng/aulas_eng.js index 1b45152b..56bf01e0 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/aulas_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/aulas_eng.js @@ -1,21 +1,21 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: aulas_eng.js -// Idioma: Ings -//________________________________________________________________________________________________________ +// Javascript language file: aulas_eng.js +// Language: English +//____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="Computer template have been successfully registered and all the computers of this lab have been updated using this configuration"; -TbMsg[1]="WARNING: This environment will be refresh. Are you sure ?"; -TbMsg[2]="WARNING: This environment will be purge. Are you sure ?"; -TbMsg[3]="WARNING: The items of menus from this environment will be refresh. Are you sure ?"; -TbMsg[4]="WARNING: This environment will be switched: Are you sure?"; -TbMsg[5]="WARNING: Remote Console is already enabled for this environment. Follow up on the screen of Commands / Scripts"; -TbMsg[6]="WARNING: You must select the 'Remote Console' previously"; -TbMsg[7]="The update request is send with success"; -TbMsg[8]="There is something wrong with the requested update"; -TbMsg[9]="The switch request is send with success"; -TbMsg[10]="There is something wrong with the requested switch"; -TbMsg[11]="The scan request is send with success"; -TbMsg[12]="There is something wrong with requested scan"; +TbMsg[0]="Computer template have been registered successfully and all the computers in this lab have been updated using this template"; +TbMsg[1]="WARNING: This scope will be refreshed. Are you sure?"; +TbMsg[2]="WARNING: This scope will be purged. Are you sure?"; +TbMsg[3]="WARNING: The menu items from this scope will be refreshed. Are you sure?"; +TbMsg[4]="WARNING: This scope will be switched. Are you sure?"; +TbMsg[5]="WARNING: Remote Console is already enabled for this scope. Follow up on the Commands/Scripts screen"; +TbMsg[6]="WARNING: You must select previously 'Remote Console'"; +TbMsg[7]="Update request has been sent successfully"; +TbMsg[8]="Error requesting updating"; +TbMsg[9]="Switch request has been sent successfully"; +TbMsg[10]="Error requesting switching"; +TbMsg[11]="Scan request has been sent successfully"; +TbMsg[12]="Error requesting scanning"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/colasacciones_eng.js b/admin/WebConsole/idiomas/javascripts/eng/colasacciones_eng.js index d9865e7d..ef967559 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/colasacciones_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/colasacciones_eng.js @@ -1,28 +1,28 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: colasacciones_eng.js -// Idioma: Ings -//________________________________________________________________________________________________________ +// Javascript language file: colasacciones_eng.js +// Language: English +//____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="WARNING: This action has finished in a way automatically and you can't change its final result manually"; -TbMsg[1]="WARNING: This action has finished and you can't change its status"; -TbMsg[2]="WARNING: This action has already finished in a way manually"; +TbMsg[0]="WARNING: This action has finished automatically and final result cannot be changed manually"; +TbMsg[1]="WARNING: This action has finished and status cannot be changed"; +TbMsg[2]="WARNING: This action has already finished manually"; TbMsg[3]="WARNING: This action has already been canceled"; -TbMsg[4]="WARNING: This action is already initiated"; +TbMsg[4]="WARNING: This action is already started"; TbMsg[5]="WARNING: This action is already stopped "; -TbMsg[6]="WARNING: This action has already been removed"; +TbMsg[6]="WARNING: This action has already been deleted"; -TbMsg[7]="WARNING: The final result of this action has been successfully modified "; -TbMsg[8]="WARNING: The status of this action has been successfully modified "; -TbMsg[9]="WARNING: This action has been successfully reinitialized"; -TbMsg[10]="WARNING: This action has been successfully removed"; +TbMsg[7]="WARNING: The final result of this action has been modified successfully "; +TbMsg[8]="WARNING: The status of this action has been modified successfully "; +TbMsg[9]="WARNING: This action has been reinitialized successfully"; +TbMsg[10]="WARNING: This action has been deleted successfully"; TbMsg[11]="WARNING: This action has finished successfully "; -TbMsg[12]="WARNING: This notification has already been removed or reinitialized"; +TbMsg[12]="WARNING: This notification has already been deleted or reinitialized"; TbMsg[13]="WARNING: This notification has already been reinitialized"; -TbMsg[14]="WARNING: It's already been successfully notified."; -TbMsg[15]="WARNING: It's already been unsuccessfully notified."; +TbMsg[14]="WARNING: It has already been notified successfully."; +TbMsg[15]="WARNING: It has already been notified unsuccessfully."; -TbMsg[16]="WARNING: The result of this notification has been successfully modified "; -TbMsg[17]="WARNING: This notification has been successfully reinitialized"; +TbMsg[16]="WARNING: The result of this notification has been modified successfully"; +TbMsg[17]="WARNING: This notification has been reinitialized successfully"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/comunescomandos_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/comunescomandos_eng.js index 3f13b558..0f81bee4 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/comandos/comunescomandos_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/comunescomandos_eng.js @@ -1,25 +1,24 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascripts: comunescomandos_eng.js (Común a todos los comandos) -// Idioma: Inglés +// Javascript language file: comunescomandos_eng.js +// Language: English //________________________________________________________________________________________________________ var CTbMsg=new Array; -CTbMsg[0]="WARNING.- Cancelled operation, you will might come back this screen in another moment to perform this command"; -CTbMsg[1]="WARNING: An error occurs when attempt to register command"; -CTbMsg[2]="The command has been successfully registered"; -CTbMsg[3]="WARNING: An error occurred while trying to register this Command as a Procedure"; -CTbMsg[4]="The command has been successfully registered as a Procedure"; -CTbMsg[5]="WARNING: An error occurred while trying to register this Command as a Task"; -CTbMsg[6]="The command has been successfully registered as a Task"; -CTbMsg[7]="WARNING: An error occurs when attempt to register command"; - -CTbMsg[8]="WARNING: Choose one mode of execution at least"; -CTbMsg[9]="WARNING: You must choose a way of immediate execution"; -CTbMsg[10]="WARNING: You must choose a way of inclusion this command on procedure"; -CTbMsg[11]="WARNING: You must specify the name of the new procedure where this command will be added"; -CTbMsg[12]="WARNING: You should choose the procedure that will add this command"; -CTbMsg[13]="WARNING: You must choose a way of inclusion this command on task executable"; -CTbMsg[14]="WARNING: You must specify the name of the new task where this command will be added"; -CTbMsg[15]="WARNING: You must choose the task that will add this command"; -CTbMsg[16]="AVISO: si el código incluye reinicio o apagado, puede provocar que el cliente no inicie correctamente"; -CTbMsg[17]="The command has been successfully registered, but there was some problems connecting repository REST API"; +CTbMsg[0]="WARNING: Canceled operation, you can return at any time on this screen to execute this command again"; +CTbMsg[1]="WARNING: Error sending this command"; +CTbMsg[2]="Command has been sent successfully"; +CTbMsg[3]="WARNING: Error registering this Command as a Procedure"; +CTbMsg[4]="The command has been registered successfully as a Procedure"; +CTbMsg[5]="WARNING: Error registering this Command as a Task"; +CTbMsg[6]="Command has been registered successfully as a Task"; +CTbMsg[7]="WARNING: Error trying to register command action"; +CTbMsg[8]="WARNING: You must choose at least one execution mode"; +CTbMsg[9]="WARNING: You must choose one immediate execution mode"; +CTbMsg[10]="WARNING: You must choose a way of including this command into a Procedure"; +CTbMsg[11]="WARNING: You must specify a name for the new procedure where this command will be added."; +CTbMsg[12]="WARNING: You must choose the procedure where this command will be added"; +CTbMsg[13]="WARNING: You must choose a way of including this command into an executable task"; +CTbMsg[14]="WARNING: You must specify a name for the new task where this command will be added"; +CTbMsg[15]="WARNING: You must choose the task where this command will be added"; +CTbMsg[16]="WARNING: If the code contains reboot or shutdown, the client might not boot successfully"; +CTbMsg[17]="Command has been sent successfully, but there was some problems connecting API REST Repository"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/configurar_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/configurar_eng.js index abc99019..38eef74f 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/comandos/configurar_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/configurar_eng.js @@ -1,16 +1,16 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascripts: configurar_eng.js -// Idioma: Ings +// Javascript language file: configurar_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="WARNING.- There are partitions with the same number, you must select another or remove it clicking in the last column"; -TbMsg[1]="WARNING.- The number of the partition must be greater than zero"; -TbMsg[2]="El tipo de particin no se ha especificado"; -TbMsg[3]="WARNING.- The size of the partition must be greater than zero"; -TbMsg[4]="ATENCION: Se va a eliminar esta particin Esta seguro ?"; -TbMsg[5]="Debe especificar el tipo de sistema de ficheros si desea formatear la particion"; -TbMsg[6]="La CACHE solo puede definirse en la particion 4"; -TbMsg[7]="El nmero maximo de particiones es 4"; -TbMsg["EXTSIZE"]="El tamao de las particiones lgicas es mayor que el de la particin extendida"; -TbMsg["HDSIZE"]="El tamao de las particiones es mayor el tamao del disco"; +TbMsg[0]="WARNING: Duplicated partition. There is another partition with the same number. Please, select another one or delete it by clicking in the last column"; +TbMsg[1]="WARNING: Partition number must be greater than zero"; +TbMsg[2]="Partition type not specified"; +TbMsg[3]="WARNING: Partition size must be greater than zero"; +TbMsg[4]="WARNING: This partition will be deleted. Are you sure?"; +TbMsg[5]="If you want to format this partition, you must specify file-system type"; +TbMsg[6]="CACHE can only be at partition 4"; +TbMsg[7]="Maximum number of partitions is 4"; +TbMsg["EXTSIZE"]="Logic partitions size is greater than extended partition size"; +TbMsg["HDSIZE"]="Partitions size is greater than disk size"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/crearimagen_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/crearimagen_eng.js index 6525d89b..07701edf 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/comandos/crearimagen_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/crearimagen_eng.js @@ -1,8 +1,8 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascripts: crearperfilsoftware_eng.js -// Idioma: Español +// Javascript language file: crearimagen_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must choose a image for this partition"; -TbMsg[1]="You must choose at least one partition and an image"; +TbMsg[0]="You must choose an image for this partition"; +TbMsg[1]="You must choose at least one partition and one image"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/crearimagenbasica_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/crearimagenbasica_eng.js index 99465fbf..2b6a9fa8 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/comandos/crearimagenbasica_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/crearimagenbasica_eng.js @@ -1,10 +1,10 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascripts: crearimagenbasica_esp.js -// Idioma: Español +// Javascript language file: crearimagenbasica_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; TbMsg[0]=""; -TbMsg[1]="Debe elegir una imagen para esta partición"; -TbMsg[2]="No ha seleccionado ninguna partición"; -TbMsg[3]="No ha seleccionado ningún método de sincronización"; +TbMsg[1]="You must choose an image for this partition"; +TbMsg[2]="No partition selected"; +TbMsg[3]="No synchronization method selected"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/crearperfilsoftware_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/crearperfilsoftware_eng.js index dbf1484a..343e7854 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/comandos/crearperfilsoftware_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/crearperfilsoftware_eng.js @@ -1,7 +1,7 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascripts: crearperfilsoftware_eng.js -// Idioma: Ings +// Javascript language file: crearperfilsoftware_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; TbMsg[0]="You must select a software profile for this partition"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/crearsoftincremental_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/crearsoftincremental_eng.js index 675b5419..25d8932c 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/comandos/crearsoftincremental_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/crearsoftincremental_eng.js @@ -1,8 +1,11 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascripts: crearsoftincremental_eng.js -// Idioma: Ings +// Javascript language file: crearsoftincremental_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must select a diferential software for this partition"; -TbMsg[1]="You must select at least a partition and a diferential software"; +TbMsg[0]=""; +TbMsg[1]="You must choose a basic image for this partition"; +TbMsg[2]="No partition selected"; +TbMsg[3]="You must choose an incremental image for this partition"; +TbMsg[4]="No synchronization method selected"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/ejecutarscripts_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/ejecutarscripts_eng.js index 577b52c8..05221224 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/comandos/ejecutarscripts_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/ejecutarscripts_eng.js @@ -1,11 +1,11 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascripts: ejecutarscripts_eng.js -// Idioma: Ings +// Javascript language file: ejecutarscripts_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="WARNING.- Bash code will be performed Are you sure ?"; -TbMsg[1]="You must introduce some code lines or at least a file with Bash code"; -TbMsg[2]="You must introduce the title of the script whether you want to follow-up the accion or to save it like a procedure or task"; -TbMsg[3]="You must introduce the description of the script whether you want to follow-up the accion or to save it like a procedure or task"; -TbMsg[4]="\t!!!!! WARNING !!!!! \nYou have selected unicast to multiple computers,\nThe transfer may be delayed in time"; \ No newline at end of file +TbMsg[0]="WARNING.- Bash code will be executed. Are you sure?"; +TbMsg[1]="You must enter some code lines or at least a file with Bash code"; +TbMsg[2]="You must enter the title of the script whether to follow-up the action or save it as a procedure or task."; +TbMsg[3]="You must enter a description for the script whether to follow-up the action or to save it as a procedure or task"; +TbMsg[4]="\t!!!!! WARNING !!!!! \nYou have selected UNICAST for multiple computers,\nThe transfer may be delayed in time"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/eliminarimagencache_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/eliminarimagencache_eng.js index e52857b0..237e8771 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/comandos/eliminarimagencache_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/eliminarimagencache_eng.js @@ -1,7 +1,7 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascripts: eliminarimagencache_eng.js -// Idioma: Ingles +// Javascript language file: eliminarimagencache_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; TbMsg[0]=""; diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/enviarmensaje_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/enviarmensaje_eng.js index 19d2316a..992120b2 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/comandos/enviarmensaje_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/enviarmensaje_eng.js @@ -1,9 +1,9 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascripts: enviarmensaje_eng.js -// Idioma: Ingls +// Javascript language file: enviarmensaje_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; TbMsg[0]=""; -TbMsg[1]="El mensaje debe tener un ttulo."; -TbMsg[2]="El mensaje debe tener algn contenido."; +TbMsg[1]="The message needs a title."; +TbMsg[2]="The message cannot be empty."; diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/iniciarsesion_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/iniciarsesion_eng.js index 86cd4cb3..d8658434 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/comandos/iniciarsesion_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/iniciarsesion_eng.js @@ -1,9 +1,9 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascripts: iniciarsesion_eng.js -// Idioma: Ingles +// Javascript language file: iniciarsesion_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; TbMsg[0]=""; TbMsg[1]="You must choose at least one partition"; -TbMsg["FILTER"]="Debe seleccionar al menos un ordenador que tenga la configuración elegida."; +TbMsg["FILTER"]="You must select at least one computer with the chosen configuration."; diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/inventariosoftware_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/inventariosoftware_eng.js index faf6091e..8da24d42 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/comandos/inventariosoftware_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/inventariosoftware_eng.js @@ -1,7 +1,7 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascripts: iniciarsesion_eng.js -// Idioma: English +// Javascript language file: inventariosoftware_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; TbMsg[0]=""; diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/particionaryformatear_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/particionaryformatear_eng.js index 6598e659..424206f4 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/comandos/particionaryformatear_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/particionaryformatear_eng.js @@ -1,15 +1,15 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascripts: particionaryformatear_eng.js -// Idioma: Ings +// Javascript language file: particionaryformatear_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="WARNING.- There are not partitions table modified, therefore no command will be registered"; -TbMsg[1]="WARNING.- There are partitions with the same number, you must select another or remove it clicking in the last column"; -TbMsg[2]="WARNING.- The size of the partition must be greater than zero"; -TbMsg[3]="WARNING.- The partition must be correlative and there would not have spaces between partitions"; -TbMsg[4]="WARNING.- This partition is empty, therefore you can't to perform any operation"; -TbMsg[5]="WARNING.- This partition must be just formatted because the operating system has changed or has changed the size of some partition"; -TbMsg[6]="WARNING.- There is not coherent to hide this partition because it is not a Windows partition"; -TbMsg[7]="WARNING.- There is not coherent to show this partition because it is not a Windows partition"; -TbMsg[8]="You can't add more partitions"; +TbMsg[0]="WARNING: There are no changes in partition table, therefore no action will be executed"; +TbMsg[1]="WARNING: There are partitions with the same number. You must select another one or remove it by clicking in the last column"; +TbMsg[2]="WARNING: Partition size must be greater than zero"; +TbMsg[3]="WARNING: Partitions must be correlatives and they must not have spaces between them"; +TbMsg[4]="WARNING: Empty partition, therefore no action will be executed"; +TbMsg[5]="WARNING: This partition must be formatted because its OS has changed or some partition size has changed."; +TbMsg[6]="WARNING: There is not coherent to hide this partition because it is not a Windows partition"; +TbMsg[7]="WARNING: There is not coherent to show this partition because it is not a Windows partition"; +TbMsg[8]="You cannot add more partitions"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/restaurarimagen_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/restaurarimagen_eng.js index f6360cc3..d709af9d 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/comandos/restaurarimagen_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/restaurarimagen_eng.js @@ -1,15 +1,15 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascripts: restaurarimagen_eng.js -// Idioma: Inglés +// Javascript language file: restaurarimagen_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must select at least an Image for partition "; -TbMsg[1]="You can only select an Image for partition "; -TbMsg[2]="WARNING: You have selected an Image from other operating system for current partition "; -TbMsg[3]="Are you sure ?"; -TbMsg[4]="You must select at least a partition and an Image"; -TbMsg[5]="You must select at least a image path for partition "; -TbMsg[6]="You must choose only one image of the down"; -TbMsg["FILTER"]="Debe seleccionar al menos un ordenador que tenga la configuración elegida."; -TbMsg["UNICAST"]="\t!!!!! ATENCIÓN !!!!! \nHa seleccionado UNICAST en varios ordenadores,\nLa transferencia puede demorarse en el tiempo"; +TbMsg[0]="You must select an image for this partition"; +TbMsg[1]="You must select at least a partition and an image"; +TbMsg[2]="WARNING: You have selected an image from a different OS for current partition"; +TbMsg[3]="Are you sure ?" +TbMsg[4]="You must select at least an image for this partition" +TbMsg[5]="You must select at least an image path for this partition "; +TbMsg[6]="You must choose the image from only one of the drop-down"; +TbMsg["FILTER"]="You must choose at least one computer with the chosen configuration."; +TbMsg["UNICAST"]="\t!!!!! WARNING !!!!! \nYou have selected UNICAST for multiple computers,\nThe transfer may be delayed in time"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/restaurarimagenbasica_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/restaurarimagenbasica_eng.js index bce2cdc4..a7023e76 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/comandos/restaurarimagenbasica_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/restaurarimagenbasica_eng.js @@ -1,14 +1,14 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascripts: restaurarimagenbasica_esp.js -// Idioma: Español +// Javascript language file: restaurarimagenbasica_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="Debe elegir una imagen para esta partición"; -TbMsg[1]="Debe elegir al menos una partición y una imagen"; +TbMsg[0]="You must choose an image for this partition"; +TbMsg[1]="You must choose at least one partition and one image"; TbMsg[2]=""; -TbMsg[3]="¿ Está seguro ?"; -TbMsg[4]="Debe elegir al menos una imagen para la partición"; -TbMsg[5]="Debe elegir al menos un path de imagen para la partición "; -TbMsg[6]="Debe elegir la imagen de uno sólo de los desplegables"; -TbMsg[7]="Debe elegir un método de Sincronización"; +TbMsg[3]="Are you sure?"; +TbMsg[4]="You must choose at least an image for this partition"; +TbMsg[5]="You must choose an image path for this partition"; +TbMsg[6]="You must choose the image from only one of the drop-down"; +TbMsg[7]="You must choose a synchronization method"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/comandos/restaurarsoftincremental_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comandos/restaurarsoftincremental_eng.js index 22a112d9..0cd47096 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/comandos/restaurarsoftincremental_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/comandos/restaurarsoftincremental_eng.js @@ -1,14 +1,14 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascripts: restaurarsoftincremental_esp.js -// Idioma: Español +// Javascript language file: restaurarsoftincremental_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="Debe elegir una imagen para esta partición"; -TbMsg[1]="Debe elegir al menos una partición y una imagen"; +TbMsg[0]="You must select an image for this partition"; +TbMsg[1]="You must select at least a partition and an image"; TbMsg[2]=" "; -TbMsg[3]="¿ Está seguro ?"; -TbMsg[4]="Debe elegir al menos una imagen para la partición"; -TbMsg[5]="Debe elegir al menos un path de imagen para la partición "; -TbMsg[6]="Debe elegir un software incremental para esta partición"; -TbMsg[7]="Debe elegir un método de Sincronización"; +TbMsg[3]="Are you sure ?"; +TbMsg[4]="You must select at least an image for this partition"; +TbMsg[5]="You must select at least an image path for this partition "; +TbMsg[6]="You must choose an incremental software for this partition"; +TbMsg[7]="You must choose a synchronization method"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/comunes_eng.js b/admin/WebConsole/idiomas/javascripts/eng/comunes_eng.js index 271dede0..1a2e7b1f 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/comunes_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/comunes_eng.js @@ -1,14 +1,14 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: comunes_eng.js -// Idioma: Ings -//________________________________________________________________________________________________________ -CTbMsg=new Array; -CTbMsg[0]="WARNING.- This group contain others groups or elements. If you remove it, you will also remove all these. Are you sure ?"; -CTbMsg[1]="WARNING.- This group will be removed. Are you sure ?"; -CTbMsg[2]="This group has been successfully modified"; -CTbMsg[3]="This group has been successfully removed"; -CTbMsg[4]="The record has been successfully inserted"; -CTbMsg[5]="The record has been successfully modified"; -CTbMsg[6]="The record has been successfully removed"; -CTbMsg[7]="There is not exists any element in stack to be moved into this group"; +// Javascript language file: comunes_eng.js +// Language: English +//____________________________________________________________________________ +TbMsg=new Array; +CTbMsg[0]="WARNING.- This group contain others groups or elements. If you delete it, you will also delete all of them. Are you sure?"; +CTbMsg[1]="WARNING.- This group will be deleted. Are you sure?"; +CTbMsg[2]="This group has been modified successfully "; +CTbMsg[3]="This group has been deleted successfully"; +CTbMsg[4]="The record has been inserted successfully"; +CTbMsg[5]="The record has been modified successfully"; +CTbMsg[6]="The record has been deleted successfully"; +CTbMsg[7]="There is no pending element to move into this group"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/consolaremota_eng.js b/admin/WebConsole/idiomas/javascripts/eng/consolaremota_eng.js index f693216a..e3eff743 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/consolaremota_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/consolaremota_eng.js @@ -1,8 +1,8 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: consolaremota_eng.js -// Idioma: English -//________________________________________________________________________________________________________ +// Javascript language file: consolaremota_eng.js +// Language: English +//____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="Attention.-Has there been any error in the Remote Console application"; -TbMsg[1]="The Remote Console request was sent successfully"; +TbMsg[0]="WARNING: Error requesting Remote Console"; +TbMsg[1]="Remote Console request has been sent successfully"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/ejecutaracciones_eng.js b/admin/WebConsole/idiomas/javascripts/eng/ejecutaracciones_eng.js index d8d27714..2bbc31ac 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/ejecutaracciones_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/ejecutaracciones_eng.js @@ -1,10 +1,9 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: ejecutaracciones_eng.js -// Idioma: Ingles +// Javascript language file: ejecutaracciones_eng.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="ATENCIÓN.- El Procedimiento será ejecutado aplicándolo a este ámbito. ¿ Está seguro ?"; -TbMsg[1]="El Procedimiento ha sido gestionado correctamente para este ámbito"; -TbMsg[2]="ATENCIÓN.- El Procedimiento se convertirá en procedimiento de inicio (Autoexec) para todos los ordenadores de este ámbito. ¿ Está seguro ?"; - +TbMsg[0]="WARNING: This Procedure will be executed by applying it to this scope. Are you sure?"; +TbMsg[1]="This Procedure has been managed successfully for this scope"; +TbMsg[2]="WARNING: This Procedure will become Starting Procedure (Autoexec)for all the computers in this scope. Are you sure?"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/ejecutarprocedimientos_eng.js b/admin/WebConsole/idiomas/javascripts/eng/ejecutarprocedimientos_eng.js index 698e4c21..f35e2d10 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/ejecutarprocedimientos_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/ejecutarprocedimientos_eng.js @@ -1,8 +1,8 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: ejecutarprocedimientos_eng.js -// Idioma: Ingls +// Javascript language file: ejecutarprocedimientos_eng.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="WARNING.- This procedure will be executed Applying this environment. Are you sure ?"; -TbMsg[1]="This procedure has been successfully executed for this environment"; +TbMsg[0]="WARNING: This Procedure will be executed by applying it to this scope. Are you sure?"; +TbMsg[1]="This procedure has been executed successfully for this scope"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/hardwares_eng.js b/admin/WebConsole/idiomas/javascripts/eng/hardwares_eng.js index 28e179a7..182844e4 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/hardwares_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/hardwares_eng.js @@ -1,7 +1,6 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: hardwares.js -// Idioma: Ings +// Javascript language file: hardwares.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; - diff --git a/admin/WebConsole/idiomas/javascripts/eng/iconos_eng.js b/admin/WebConsole/idiomas/javascripts/eng/iconos_eng.js index 25dd6bb7..aec2cbed 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/iconos_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/iconos_eng.js @@ -1,7 +1,7 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: acciones_esp.js -// Idioma: Español +// Javascript language file: acciones_esp.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; -TbMsg["DESCRIP"]="Description is a mandatory"; +TbMsg["DESCRIP"]="Description is mandatory."; diff --git a/admin/WebConsole/idiomas/javascripts/eng/imagenes_eng.js b/admin/WebConsole/idiomas/javascripts/eng/imagenes_eng.js index 171afd22..f5e46fa2 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/imagenes_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/imagenes_eng.js @@ -1,7 +1,6 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: imagenes.js -// Idioma: Ings +// Javascript language file: imagenes.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; - diff --git a/admin/WebConsole/idiomas/javascripts/eng/imagenincremental_eng.js b/admin/WebConsole/idiomas/javascripts/eng/imagenincremental_eng.js index e9e69b92..ff046578 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/imagenincremental_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/imagenincremental_eng.js @@ -1,8 +1,8 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: incrementalcomponente_soft_eng.js -// Idioma: Ings +// Javascript language file: incrementalcomponente_soft_eng.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="This incremental software has been successfully included in this image"; -TbMsg[1]="This incremental software has been successfully excluded from this iamge"; +TbMsg[0]="This incremental software has been included successfully into this image"; +TbMsg[1]="This incremental software has been excluded successfully from this image"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/inclusionacciones_eng.js b/admin/WebConsole/idiomas/javascripts/eng/inclusionacciones_eng.js index bb842521..c76954f4 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/inclusionacciones_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/inclusionacciones_eng.js @@ -1,10 +1,9 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: inclusionacciones_eng.js -// Idioma: Ingles -//________________________________________________________________________________________________________ +// Javascript language file: inclusionacciones_eng.js +// Language: English +//____________________________________________________________________________ TbMsg=new Array; TbMsg[0]=""; -TbMsg[1]=" ATENCIÓN: Debe introducir un número de orden correcto"; -TbMsg[2]="El proceso se ha ejecutado correctamente"; - +TbMsg[1]="WARNING: You must enter a correct sequence number."; +TbMsg[2]="Process has been executed successfully"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/incrementalcomponente_soft_eng.js b/admin/WebConsole/idiomas/javascripts/eng/incrementalcomponente_soft_eng.js index 16c594c8..7e51b034 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/incrementalcomponente_soft_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/incrementalcomponente_soft_eng.js @@ -1,8 +1,8 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: incrementalcomponente_soft_eng.js -// Idioma: Ings +// Javascript language file: incrementalcomponente_soft_eng.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="This software component has been successfully included in this incremental software"; -TbMsg[1]="This software component has been successfully excluded from this incremental software"; +TbMsg[0]="This software component has been included successfully into this incremental software"; +TbMsg[1]="This software component has been excluded successfully from this incremental software"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/informacion_menus_eng.js b/admin/WebConsole/idiomas/javascripts/eng/informacion_menus_eng.js index 79274efe..682afaef 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/informacion_menus_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/informacion_menus_eng.js @@ -1,9 +1,9 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: informacion_menus_eng.js -// Idioma: Ings +// Javascript language file: informacion_menus_eng.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="WARNING.- This item will be removed. Are you sure ?"; -TbMsg[1]="This item has been successfully excluded from this menu"; -TbMsg[2]="This item has been successfully modified"; +TbMsg[0]="WARNING: This item will be deleted. Are you sure?"; +TbMsg[1]="This item has been excluded successfully from this menu"; +TbMsg[2]="This item has been modified successfully"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/menus_eng.js b/admin/WebConsole/idiomas/javascripts/eng/menus_eng.js index 39ea2374..c8b562a9 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/menus_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/menus_eng.js @@ -1,7 +1,6 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: menus_eng.js -// Idioma: Ings +// Javascript language file: menus_eng.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; - diff --git a/admin/WebConsole/idiomas/javascripts/eng/perfilcomponente_hard_eng.js b/admin/WebConsole/idiomas/javascripts/eng/perfilcomponente_hard_eng.js index 8a102354..beecbb53 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/perfilcomponente_hard_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/perfilcomponente_hard_eng.js @@ -1,8 +1,8 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: perfilcomponente_hard_eng.js -// Idioma: Ings +// Javascript language file: perfilcomponente_hard_eng.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="This hardware component has been successfully included in this profile"; -TbMsg[1]="This hardware component has been successfully excluded from this profile"; +TbMsg[0]="This hardware component has been included successfully into this profile"; +TbMsg[1]="This hardware component has been excluded successfully from this profile"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/perfilcomponente_soft_eng.js b/admin/WebConsole/idiomas/javascripts/eng/perfilcomponente_soft_eng.js index d693301c..64ee42cb 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/perfilcomponente_soft_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/perfilcomponente_soft_eng.js @@ -1,8 +1,8 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: perfilcomponente_soft_eng.js -// Idioma: Ings +// Javascript language file: perfilcomponente_soft_eng.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="This software component has been successfully included in this profile"; -TbMsg[1]="This software component has been successfully excluded from this profile"; +TbMsg[0]="This software component has been included successfully into this profile"; +TbMsg[1]="This software component has been excluded successfully from this profile"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/procedimientoscomandos_eng.js b/admin/WebConsole/idiomas/javascripts/eng/procedimientoscomandos_eng.js index c01dbc5d..48b35d95 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/procedimientoscomandos_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/procedimientoscomandos_eng.js @@ -1,10 +1,10 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: procedimientoscomandos_eng.js -// Idioma: Ings +// Javascript language file: procedimientoscomandos_eng.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="WARNING.- This command will be excluded from procedure. Are you sure ?"; -TbMsg[1]="WARNING: You must introduce an order number"; -TbMsg[2]="This command has been successfully excluded from this procedure"; -TbMsg[3]="This commad has been successfully modified"; +TbMsg[0]="WARNING: This command will be excluded from this procedure. Are you sure?"; +TbMsg[1]="WARNING: You must enter a sequence number"; +TbMsg[2]="This command has been excluded successfully from this procedure"; +TbMsg[3]="This command has been modified successfully"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/programaciones_eng.js b/admin/WebConsole/idiomas/javascripts/eng/programaciones_eng.js index 35955178..de2f62f6 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/programaciones_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/programaciones_eng.js @@ -1,21 +1,21 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: programaciones_eng.js -// Idioma: Ingls -//________________________________________________________________________________________________________ +// Javascript language file: programaciones_eng.js +// Language: English +//____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="ATENCIN: Debe elegir algn ao"; -TbMsg[1]="ATENCIN: Debe elegir algn mes"; -TbMsg[2]="ATENCIN: Debe elegir algn da de la semana, alguna semana o algn da del mes"; -TbMsg[3]="ATENCIN: Debe elegir algn da del mes"; -TbMsg[4]="ATENCIN: Debe elegir alguna hora"; -TbMsg[5]="ATENCIN: Debe introducir la descripcin del bloque de programacion"; -TbMsg[6]="ATENCIN: Debe introducir los minutos entre los valores 0 y 59"; -TbMsg[7]="ATENCIN: Debe introducir los segundos entre los valores 0 y 59"; -TbMsg[8]="ATENCIN: Debe insertar algn bloque para poder suspender temporalmente la programacin de todos ellos"; -TbMsg[9]="La programacin se ha suspendido temporalmente con xito"; -TbMsg[10]="La programacin se ha activado de nuevo con xito"; -TbMsg[11]="El bloque de programacin se ha registrado correctamente"; -TbMsg[12]="El bloque de programacin se ha modificado correctamente"; -TbMsg[13]="El bloque de programacin se ha eliminado correctamente"; -TbMsg[14]="No existe ningn bloque seleccionado"; +TbMsg[0]="WARNING: You must choose a year"; +TbMsg[1]="WARNING: You must choose a month"; +TbMsg[2]="WARNING: You must choose a weekday, a week or a day of the month"; +TbMsg[3]="WARNING: You must choose a day of the month"; +TbMsg[4]="WARNING: You must choose a time"; +TbMsg[5]="WARNING: You must enter the programming block description"; +TbMsg[6]="WARNING: Minutes must be from 0 to 59"; +TbMsg[7]="WARNING: Seconds must be from 0 to 59"; +TbMsg[8]="WARNING: You must enter a block to pause the programming of all of them"; +TbMsg[9]="Programming has been paused successfully"; +TbMsg[10]="Programming has been resumed successfully"; +TbMsg[11]="Programming block has been registered successfully"; +TbMsg[12]="Programming block has been modified successfully"; +TbMsg[13]="Programming block has been deleted successfully"; +TbMsg[14]="There is no selected block"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_aulas_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_aulas_eng.js index 82f9c0c1..0428c2d0 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_aulas_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_aulas_eng.js @@ -1,26 +1,26 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_aulas_eng.js -// Idioma: Inglés -//________________________________________________________________________________________________________ +// Javascript language file: propiedades_aulas_eng.js +// Language: English +//____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="El nombre del aula debe contener caracteres alfanumericos"; -TbMsg[1]="You must introduce a number of Capacity for this lab"; -TbMsg[2]="WARNING.- This lab contain others groups or labs. If you remove it, you will also remove all these. Are you sure?"; -TbMsg[3]="Time for begining of reserves periode must be smaller than final time"; -TbMsg[4]="Multicast speed is not valid, use numbers only"; -TbMsg[5]="Netmask is not valid"; +TbMsg[0]="Lab name must contain alphanumeric characters"; +TbMsg[1]="You must enter the maximum number of people for this lab"; +TbMsg[2]="WARNING: This lab contains computers groups or computers. If you delete it, you will also delete all of them. Are you sure?"; +TbMsg[3]="Start time for reservations must be before final time"; +TbMsg[4]="Multicast speed is not valid, please use numbers only"; +TbMsg[5]="Net mask is not valid"; TbMsg[6]="P2P mode is not valid"; -TbMsg[7]="El tiempo (segundos ) de semillero despues de la descarga p2p no es valida"; +TbMsg[7]="Seed time (seconds) after p2p download is not valid"; TbMsg[8]="Multicast mode is not valid"; TbMsg[9]="Multicast IP address is not valid"; TbMsg[10]="Multicast port is not valid"; TbMsg[11]="Multicast speed is not valid, use numbers only"; -TbMsg[12]="DNS server IP address is not valid"; +TbMsg[12]="IP address of DNS server is not valid"; TbMsg[13]="Proxy server URL is not valid"; -TbMsg[14]="Deben introducirse datos de validacion: pagina de login y pagina de validacion"; -TbMsg[15]="La URL de la pagina de login no es valida"; -TbMsg[16]="La URL de la pagina de validación no es valida"; -TbMsg[17]="La ubicacion solo puede contener caracteres alfanumericos"; -TbMsg[18]="Los comentarios solo pueden contener caracteres alfanumericos"; -TbMsg[19]="NTP server IP address is not valid"; +TbMsg[14]="You must enter validation data: login page and validation page"; +TbMsg[15]="Login page URL is not valid"; +TbMsg[16]="Validation page URL is not valid"; +TbMsg[17]="The location can only contain alphanumeric characters" +TbMsg[18]="The comments can only contain alphanumeric characters" +TbMsg[19]="IP address of NTP server is not valid"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_centros_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_centros_eng.js index 874bff00..32f1b408 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_centros_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_centros_eng.js @@ -1,10 +1,9 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_usuarios_eng.js -// Idioma: Ings -//________________________________________________________________________________________________________ +// Javascript language file: propiedades_usuarios_eng.js +// Language: English +//____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must introduce a name for this Organizing Unit y slo puede contener caracteres alfanumricos"; -TbMsg[1]="El comentario slo puede contener caracteres alfanumricos"; -TbMsg[2]="El directorio slo puede contener caracteres alfanumricos"; - +TbMsg[0]="You must enter a name for the Organizational Unit. It can only contain alphanumeric characters"; +TbMsg[1]="The comment can only contain alphanumeric characters"; +TbMsg[2]="The directory can only contain alphanumeric characters"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_componentehardwares_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_componentehardwares_eng.js index 4ee13c51..18c279af 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_componentehardwares_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_componentehardwares_eng.js @@ -1,8 +1,8 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_componentehardwares_eng.js -// Idioma: Ings -//________________________________________________________________________________________________________ +// Javascript language file: propiedades_componentehardwares_eng.js +// Language: English +//____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must introduce a name for this hardware component "; -TbMsg[1]="You must introduce a hardware type for this component"; \ No newline at end of file +TbMsg[0]="You must enter a name for this hardware component "; +TbMsg[1]="You must enter a hardware type for this component"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_componentesoftwares_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_componentesoftwares_eng.js index faf928ba..7fd39070 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_componentesoftwares_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_componentesoftwares_eng.js @@ -1,9 +1,9 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_componentesoftwares_eng.js -// Idioma: Ings -//________________________________________________________________________________________________________ +// Javascript language file: propiedades_componentesoftwares_eng.js +// Language: English +//____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must introduce a name for this software component "; -TbMsg[1]="You must introduce a software type for this component"; -TbMsg[2]="You must introduce an operating system name for this component"; \ No newline at end of file +TbMsg[0]="You must enter a name for this software component "; +TbMsg[1]="You must enter a software type for this component"; +TbMsg[2]="You must enter an OS name for this component"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_entidades_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_entidades_eng.js index bfc09a61..61bf4eb0 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_entidades_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_entidades_eng.js @@ -1,9 +1,9 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_usuarios_eng.js -// Idioma: Ings -//________________________________________________________________________________________________________ +// Javascript language file: propiedades_entidades_eng.js +// Language: English +//____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must introduce a name for this Entity y slo puede contener caracteres alfanumricos"; -TbMsg[1]="El comentario slo puede contener caracteres alfanumricos"; -TbMsg['PXE']="Si cambia est opcin debe guardar de nuevo la configuracin \ndel arranque PXE de los clientes en NetBootAvanzado"; +TbMsg[0]="You must enter a name for this Entity. It can only contain alphanumeric characters"; +TbMsg[1]="The comment can only contain alphanumeric characters"; +TbMsg['PXE']="If you change this option, you must save again the PXE boot configuration \nof clients in AdvancedNetBoot"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_grupos_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_grupos_eng.js index 791611bf..cf0fffa0 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_grupos_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_grupos_eng.js @@ -1,7 +1,7 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_grupos_eng.js -// Idioma: Ings +// Javascript language file: propiedades_grupos_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must introduce a name for this group"; +TbMsg[0]="You must enter a name for this group"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_imagenes_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_imagenes_eng.js index 2f5301dc..fc16ecd0 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_imagenes_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_imagenes_eng.js @@ -1,9 +1,15 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_imagenes_eng.js -// Idioma: Ings -//________________________________________________________________________________________________________ +// Javascript language file: propiedades_imagenes_eng.js propiedades_imagenes_eng.js +// Language: English +//____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must introduce a name for this image"; -TbMsg[1]="The image must contain at least some of a software profile"; -TbMsg[2]="WARNING: There are computers with this image in some of their partitions. Are you sure ?"; +TbMsg[0]="You must enter a name for this image"; +TbMsg[1]="The image must contain at least one software profile"; +TbMsg[2]="WARNING: There are computers with this image in one of their partitions. Are you sure?"; +TbMsg[3]="Canonical name of image-file fichero-imagen can only contain alphanumeric characters"; +TbMsg[4]="Missing partition number"; +TbMsg[5]="Missing partition type"; +TbMsg[6]="Missing repository"; +TbMsg[7]="Missing comment"; +TbMsg[8]="You must choose basic image for attaching this one"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_menus_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_menus_eng.js index ab85bf7e..646339f7 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_menus_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_menus_eng.js @@ -1,9 +1,9 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_menus_eng.js -// Idioma: Ings +// Javascript language file: propiedades_menus_eng.js propiedades_menus_eng.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must introduce a name for this menu"; -TbMsg[1]="WARNING: There are computers managed by this menu. You can't remove them until you change menu to this computers"; -TbMsg[2]="Las url de los mens personalizados,privados o pblicos, deben empezar con http:// o https://"; +TbMsg[0]="You must enter a name for this menu"; +TbMsg[1]="WARNING: Some computers have already this menu. You can't delete it until you change that menu in those computers"; +TbMsg[2]="URLs of Personalized, Private or Public menus must start with http:// or https://"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_ordenadores_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_ordenadores_eng.js index 9ecf454d..7ddd7ab6 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_ordenadores_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_ordenadores_eng.js @@ -1,13 +1,13 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_ordenadores_eng.js -// Idioma: Ings +// Javascript language file: propiedades_ordenadores_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="El nombre del ordenador puede contener caracteres alfanumricos, subrayados y guiones"; -TbMsg[1]="You must introduce an IP Address"; -TbMsg[2]="You must introduce a MAC Address"; -TbMsg[3]="The serial number must be an alphanumeric value"; +TbMsg[0]="Computer name can contain alphanumeric characters, underlined and hyphens"; +TbMsg[1]="You must enter an IP Address"; +TbMsg[2]="You must enter a MAC Address"; +TbMsg[3]="Serial number must be an alphanumeric character"; TbMsg[4]=""; -TbMsg[5]="You must introduce a OpenGnsys server"; -TbMsg[6]="Deben introducirse datos de validacin: pgina de login y pgina de validacin"; +TbMsg[5]="You must enter a default OpenGnsys repository"; +TbMsg[6]="You must enter validation data: login page and validation page"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_perfilhardwares_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_perfilhardwares_eng.js index 25ee5642..cc20b204 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_perfilhardwares_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_perfilhardwares_eng.js @@ -1,8 +1,8 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_perfilhardwares_eng.js -// Idioma: Ings +// Javascript language file: propiedades_perfilhardwares_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must introduce a name for this hardware profile"; -TbMsg[1]="WARNING: There are computers with this profile. You can't remove them until you change hardware profile to this computers"; +TbMsg[0]="You must enter a name for this hardware profile"; +TbMsg[1]="WARNING: Some computers contain this hardware profile. You can't delete it until you change hardware profile in those computers"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_perfilsoftwares_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_perfilsoftwares_eng.js index 712f263b..b82551d2 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_perfilsoftwares_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_perfilsoftwares_eng.js @@ -1,8 +1,8 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_perfilsoftwares_eng.js -// Idioma: Ings +// Javascript language file: propiedades_perfilsoftwares_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must introduce a name for this software profile"; -TbMsg[1]="WARNING: There are images with this profile. You can't remove them until you change software profile to this images"; +TbMsg[0]="You must enter a name for this software profile"; +TbMsg[1]="WARNING: Some computers contain this software profile. You can't delete it until you change software profile in those computers"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_procedimientos_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_procedimientos_eng.js index 03c1d5d7..7fb743ce 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_procedimientos_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_procedimientos_eng.js @@ -1,7 +1,7 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_procedimientos_eng.js -// Idioma: Ings +// Javascript language file: propiedades_procedimientos_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must introduce a name for this procedure"; +TbMsg[0]="You must enter a name for this procedure"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_repositorios_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_repositorios_eng.js index bc243de7..446a75f0 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_repositorios_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_repositorios_eng.js @@ -1,11 +1,11 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_repositorios_eng.js -// Idioma: Ingles +// Javascript language file: propiedades_repositorios_eng.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="El nombre del repositorio sólo puede contener caracteres alfanuméricos"; -TbMsg[1]="Debe introducir una dirección IP"; -TbMsg[2]="ATENCIÓN: Hay imágenes alojadas por este repositorio. ¿Está seguro de querer eliminarlo ?"; -TbMsg[3]="Debe introducir un puerto de comunicaciones para los clientes"; -TbMsg[4]="Los comentarios sólo pueden contener caracteres alfanuméricos"; +TbMsg[0]="Repository name can only contain alphanumeric characters"; +TbMsg[1]="You must enter IP address"; +TbMsg[2]="WARNING: There are some images in this repository. Do you really want to delete it?"; +TbMsg[3]="You must enter Comm port for clients"; +TbMsg[4]="Comments can only contain alphanumeric characters."; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_reservas_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_reservas_eng.js index d3dc6fb6..f43a22aa 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_reservas_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_reservas_eng.js @@ -1,11 +1,11 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_imagenes_eng.js -// Idioma: Inglés +// Javascript language file: propiedades_reservas_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must introduce a name for this reserva"; -TbMsg[1]="The image must contain at least some of a petitioner"; -TbMsg[2]="You must reserve at least a Lab"; -TbMsg[3]="You must to specify some state from this reserve"; -TbMsg[4]="WARNING.- You has specified time for previous action from this reserve. Are you sure?"; +TbMsg[0]="You must enter a name for this reservation"; +TbMsg[1]="The image must contain at least one petitioner"; +TbMsg[2]="You must choose one lab for this reservation"; +TbMsg[3]="You must specify state for this reservation"; +TbMsg[4]="WARNING: You have specified some time for previous actions to this reservation. Are you sure?" diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_softincrementales_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_softincrementales_eng.js index e97e500c..5afa1caf 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_softincrementales_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_softincrementales_eng.js @@ -1,7 +1,7 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_softincrementales_eng.js -// Idioma: Ings +// Javascript language file: propiedades_softincrementales_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must introduce a name for this incremental software"; +TbMsg[0]="You must enter a name for this incremental software"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_tareas_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_tareas_eng.js index eede2409..ffceef96 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_tareas_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_tareas_eng.js @@ -1,7 +1,9 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_tareas_eng.js -// Idioma: Ings +// Javascript language file: propiedades_tareas_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must introduce a name for this task"; +TbMsg[0]="You must enter a name for this task"; +TbMsg[1]="You must choose a scope for this task"; +TbMsg[2]="WARNING: If you do not choose a scope for this task you will not be able to add procedures to this task. You can only include other tasks with their own scopes."; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_tipohardwares_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_tipohardwares_eng.js index 2cef3703..816b645b 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_tipohardwares_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_tipohardwares_eng.js @@ -1,8 +1,7 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_tipohardwares_eng.js -// Idioma: Ings +// Javascript language file: propiedades_tipohardwares_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must introduce a name for this hardware type "; - +TbMsg[0]="You must enter a name for this hardware type "; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_trabajos_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_trabajos_eng.js index f90396e0..7d1a3a8d 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_trabajos_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_trabajos_eng.js @@ -1,7 +1,7 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_trabajos_eng.js -// Idioma: Ings +// Javascript language file: propiedades_trabajos_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must introduce a name for this job"; +TbMsg[0]="You must enter a name for this job"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_universidades_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_universidades_eng.js index 7477ed4b..565f08e8 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_universidades_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_universidades_eng.js @@ -1,7 +1,7 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_universidades_eng.js -// Idioma: Ings +// Javascript language file: propiedades_universidades_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must introduce a name for this University"; +TbMsg[0]="You must enter a name for this University"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_usuarios_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_usuarios_eng.js index 4d7151e4..04200171 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_usuarios_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_usuarios_eng.js @@ -1,13 +1,13 @@ //________________________________________________________________________________________________________ // -// Fichero de idiomas javascript: propiedades_usuarios_eng.js -// Idioma: Ings +// Javascript language file: propiedades_usuarios_eng.js +// Language: English //________________________________________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="You must introduce an user"; -TbMsg[1]="You must introduce a password for this user"; -TbMsg[2]="You must introduce a complete name"; -TbMsg[3]="You must introduce an organizing unit for this user"; -TbMsg[4]="You must introduce a language"; -TbMsg[5]="Los campos 'Password' y 'Confirmar password' no coinciden"; -TbMsg[6]="La clave debe tener un mnimo de 8 caracteres"; +TbMsg[0]="You must enter user name"; +TbMsg[1]="You must enter a password for this user"; +TbMsg[2]="You must enter complete name"; +TbMsg[3]="You must enter organizational unit for this user"; +TbMsg[4]="You must enter language"; +TbMsg[5]="'Password' and 'Confirm password' does not match"; +TbMsg[6]="The key must be at least 8 characters"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/reservas_eng.js b/admin/WebConsole/idiomas/javascripts/eng/reservas_eng.js index 890e7394..54457f61 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/reservas_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/reservas_eng.js @@ -1,7 +1,6 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: reservas.js -// Idioma: Ings +// Javascript language file: reservas_eng.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; - diff --git a/admin/WebConsole/idiomas/javascripts/eng/softwares_eng.js b/admin/WebConsole/idiomas/javascripts/eng/softwares_eng.js index 1f399ec5..4e3522ee 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/softwares_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/softwares_eng.js @@ -1,6 +1,6 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: softwares.js -// Idioma: Ings +// Javascript language file: softwares_eng.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; diff --git a/admin/WebConsole/idiomas/javascripts/eng/tareascomandos_eng.js b/admin/WebConsole/idiomas/javascripts/eng/tareascomandos_eng.js index d5cfa10d..7b9c146a 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/tareascomandos_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/tareascomandos_eng.js @@ -1,10 +1,10 @@ //____________________________________________________________________________ // // Fichero de idiomas javascript: tareascomandos_eng.js -// Idioma: Ings +// Idioma: Ingls //____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="WARNING.- This command will be excluded from task. Are you sure ?"; -TbMsg[1]="WARNING: You must introduce an order number"; -TbMsg[2]="This command has been successfully excluded from this task"; -TbMsg[3]="This commad has been successfully modified"; +TbMsg[0]="WARNING: This command will be excluded from this task. Are you sure?"; +TbMsg[1]="WARNING: You must enter a sequence number"; +TbMsg[2]="This command has been excluded successfully from this task"; +TbMsg[3]="This command has been modified successfully"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/trabajostareas_eng.js b/admin/WebConsole/idiomas/javascripts/eng/trabajostareas_eng.js index dc334d71..7e2f92a7 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/trabajostareas_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/trabajostareas_eng.js @@ -1,10 +1,10 @@ //____________________________________________________________________________ // -// Fichero de idiomas javascript: trabajostareas_eng.js -// Idioma: Ings +// Javascript language file: trabajostareas_eng.js +// Language: English //____________________________________________________________________________ TbMsg=new Array; -TbMsg[0]="This task has been successfully included in this job"; -TbMsg[1]="WARNING: You must introduce an order number"; -TbMsg[2]="This task has been successfully excluded from this job"; -TbMsg[3]="This task has been successfully modified"; +TbMsg[0]="This task has been included successfully in this job"; +TbMsg[1]="WARNING: You must enter a sequence number"; +TbMsg[2]="This task has been excluded successfully from this job"; +TbMsg[3]="This task has been modified successfully"; -- cgit v1.2.3-18-g5258 From 8ee55197e36a8999dbaf039a52d8549004d0475b Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Fri, 22 Jun 2018 09:17:47 +0000 Subject: #842 Consola: Se termina traducción al inglés de consola actual MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/WebConsole/idiomas/javascripts/eng/asistentes_eng.js | 2 +- admin/WebConsole/idiomas/php/eng/propiedades_aulas_eng.php | 2 +- admin/WebConsole/idiomas/php/eng/propiedades_ordenadores_eng.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/WebConsole/idiomas/javascripts/eng/asistentes_eng.js b/admin/WebConsole/idiomas/javascripts/eng/asistentes_eng.js index 336ebbb8..01753ce3 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/asistentes_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/asistentes_eng.js @@ -7,4 +7,4 @@ TbMsg=new Array; // Asistente de particionado TbMsg["NOCACHESIZE"] = "Free disk space is smaller than cache!"; TbMsg["NODISKSIZE"] = "Free disk space cannot be lower than zero!"; -TbMsg["NOSUPPORT"] = "Este navegador no soporta la operación."; +TbMsg["NOSUPPORT"] = "This browser does not support this operation."; diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_aulas_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_aulas_eng.php index 8841a2ee..f308484e 100644 --- a/admin/WebConsole/idiomas/php/eng/propiedades_aulas_eng.php +++ b/admin/WebConsole/idiomas/php/eng/propiedades_aulas_eng.php @@ -58,4 +58,4 @@ $TbMsg['PROP_REMOTEACCESS']="Remote access"; $TbMsg['COMM_REMOTEACCESS']="allow remote access management to computers"; $TbMsg['COMM_DEFOGLIVE']="Assigned by administrator"; // Ticket-816 PCprofesor -$TbMsg['PROP_PROFCOMPUTER']="Professor's computer"; +$TbMsg['PROP_PROFCOMPUTER']="Teacher‘s computer", diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_ordenadores_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_ordenadores_eng.php index 4b748df7..aec63524 100644 --- a/admin/WebConsole/idiomas/php/eng/propiedades_ordenadores_eng.php +++ b/admin/WebConsole/idiomas/php/eng/propiedades_ordenadores_eng.php @@ -31,4 +31,4 @@ $TbMsg["PROP_SERIALNO"]="Serial No."; $TbMsg["WARN_NOTDETECTED"]="(not detected)"; $TbMsg['COMM_DEFOGLIVE']="Assigned by administrator"; // Ticket-816 PCprofesor -$TbMsg['WARN_PROFESSOR']="professor"; +$TbMsg['WARN_PROFESSOR']="teacher"; -- cgit v1.2.3-18-g5258 From 7059c451e448bca5c064961210a48d42f7398f23 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Mon, 25 Jun 2018 10:47:19 +0200 Subject: #718: Checking download in {{{launchOgagentInstaller}}} script. --- client/shared/scripts/launchOgagentInstaller | 46 +++++++++++++--------------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/client/shared/scripts/launchOgagentInstaller b/client/shared/scripts/launchOgagentInstaller index 58d63dde..85f507b0 100755 --- a/client/shared/scripts/launchOgagentInstaller +++ b/client/shared/scripts/launchOgagentInstaller @@ -13,7 +13,7 @@ # Global variables. PROG="$(basename "$0")" if which curl &>/dev/null; then - DOWNLOAD="curl -k --timeout 1 -o" + DOWNLOAD="curl -k -f --connect-timeout 1 -o" else DOWNLOAD="wget --no-check-certificate -T 1 -O" fi @@ -41,11 +41,10 @@ case "$(ogGetOsType $1 $2)" in # Downloading OGAgent installer for Windows. OGAGENTFILE="OGAgentSetup-${OGVERSION/pre/}.exe" TMPDIR="$(ogGetPath "$MNTDIR/Windows/Temp")" - eval $DOWNLOAD "$TMPDIR/$OGAGENTFILE" "https://$(ogGetServerIp)/opengnsys/descargas/$OGAGENTFILE" 2>/dev/null if ogListSoftware $1 $2 | grep -qi "opengnsys agent"; then echo "OGAgent for Windows is already installed, you need to uninstall it before re-install." else - if [ -s "$TMPDIR/$OGAGENTFILE" ]; then + if eval $DOWNLOAD "$TMPDIR/$OGAGENTFILE" "https://$(ogGetServerIp)/opengnsys/descargas/$OGAGENTFILE" 2>/dev/null; then # Run once OGAgent Installer. if hivexsh -w << EOT 2>/dev/null; then load $HIVE @@ -68,7 +67,7 @@ EOT exit $OG_ERR_NOTFOUND fi fi - ;; + ;; Linux) # OGAgent for Linux (only deb and redhat-based backages; TODO suse-based package). if ogListSoftware $1 $2 | grep -qi "ogagent"; then echo "OGAgent for Linux is already installed, you need to uninstall it before re-install." @@ -76,20 +75,19 @@ EOT SYSTEMDDIR="$MNTDIR/lib/systemd" [ -d "$SYSTEMDDIR" -a -d "${SYSTEMDDIR/lib/etc}" ] || ogRaiseError $OG_ERR_NOTFOUND "$1 $2 systemd" || exit $OG_ERR_NOTFOUND # Downloading OGAgent installer for Linux. - if [ -e $MNTDIR/etc/debian_version ]; then # Debian-based + if [ -e $MNTDIR/etc/debian_version ]; then # Debian-based OGAGENTFILE="ogagent_${OGVERSION/pre/}_all.deb" CODE="if ! dpkg -l ogagent &>/dev/null && [ -f /var/tmp/$OGAGENTFILE ]; then apt-get update; apt-get install -y /var/tmp/$OGAGENTFILE; fi" - fi - if [ -e $MNTDIR/etc/redhat-release ]; then # RedHat-based - OGAGENTFILE="ogagent-${OGVERSION/pre/}-1.noarch.rpm" + fi + if [ -e $MNTDIR/etc/redhat-release ]; then # RedHat-based + OGAGENTFILE="ogagent-${OGVERSION/pre/}-1.noarch.rpm" CODE="if ! rpm -q ogagent &>/dev/null && [ -f /var/tmp/$OGAGENTFILE ]; then yum install -y /var/tmp/$OGAGENTFILE; fi" - fi - [ -n "$OGAGENTFILE" ] || ogRaiseError $OG_ERR_NOTFOUND "$1 $2 ogagent" || exit $OG_ERR_NOTFOUND + fi + [ -n "$OGAGENTFILE" ] || ogRaiseError $OG_ERR_NOTFOUND "$1 $2 ogagent" || exit $OG_ERR_NOTFOUND TMPDIR="$MNTDIR/var/tmp" - eval $DOWNLOAD "$TMPDIR/$OGAGENTFILE" "https://$(ogGetServerIp)/opengnsys/descargas/$OGAGENTFILE" 2>/dev/null - if [ -s "$TMPDIR/$OGAGENTFILE" ]; then - # Creating systemd script. - cat << EOT > $SYSTEMDDIR/systemd-launchogagent + if eval $DOWNLOAD "$TMPDIR/$OGAGENTFILE" "https://$(ogGetServerIp)/opengnsys/descargas/$OGAGENTFILE" 2>/dev/null; then + # Creating systemd script. + cat << EOT > $SYSTEMDDIR/systemd-launchogagent #!/bin/bash [ $EUID = 0 ] || exit 4 start() { @@ -108,12 +106,12 @@ restart() { } case "\$1" in - start|restart) "\$1" ;; + start|restart) "\$1" ;; esac EOT chmod +x $SYSTEMDDIR/systemd-launchogagent - # Creating systemd service. - cat << EOT > $SYSTEMDDIR/system/launchogagent.service + # Creating systemd service. + cat << EOT > $SYSTEMDDIR/system/launchogagent.service [Unit] Description=Installing and configuring OGAgent @@ -127,21 +125,21 @@ TimeoutStartSec=5min WantedBy=multi-user.target EOT ln -fs /lib/systemd/system/launchogagent.service \ - ${SYSTEMDDIR/lib/etc}/system/multi-user.target.wants - echo "Scheduled OGAgent installation at next boot" - echo " (process will be executed in the background, do not shutdown until finish)." + ${SYSTEMDDIR/lib/etc}/system/multi-user.target.wants + echo "Scheduled OGAgent installation at next boot" + echo " (process will be executed in the background, do not shutdown until finish)." else ogRaiseError $OG_ERR_NOTFOUND "$1 $2 /var/tmp/$OGAGENTFILE" exit $OG_ERR_NOTFOUND fi fi - ;; + ;; MacOS) # OGAgent for macOS (TODO). - echo "OGAgent installer for macOS is not implemented yet." - ;; + echo "OGAgent installer for macOS is not implemented yet." + ;; *) # OS not detected or OGAgent not implemented. ogRaiseError $OG_ERR_NOTOS "$1 $2" exit $OG_ERR_NOTOS - ;; + ;; esac -- cgit v1.2.3-18-g5258 From beed37b26bbf4efba8f94d1ccdcd4d2d009be484 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Wed, 4 Jul 2018 12:37:02 +0200 Subject: #852: Using timestamp to calculate automatic power off time. --- client/shared/bin/poweroffconf | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/client/shared/bin/poweroffconf b/client/shared/bin/poweroffconf index 02038605..de6726b4 100755 --- a/client/shared/bin/poweroffconf +++ b/client/shared/bin/poweroffconf @@ -2,6 +2,7 @@ #/** #@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 @@ -10,7 +11,9 @@ #@version 1.0.5: incluir opción para deshabilitar ahorro de energía. #@author Ramón Gómez - Univ. Sevilla #@date 2014-02-07 -#@warning License: GNU GPLv3+ +#@version 1.1.1: Corregir problema al cambiar de día +#@author Ramón Gómez - Univ. Sevilla +#@date 2018-07-04 #*/ @@ -49,7 +52,7 @@ case $# in # 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" +"%H%M")} + POWEROFFTIME=${POWEROFFSLEEP:+$(date --date="$POWEROFFSLEEP min" +"%s")} perl -pi -e "s/POWEROFFTIME=.*/POWEROFFTIME=$POWEROFFTIME/" $POWEROFFCONF fi exit 0 ;; @@ -64,10 +67,10 @@ if [ -n "$($PGREP $OPENGNSYS | egrep -v "$OGETC|$0")" ]; then perl -pi -e 's/POWEROFFTIME=.*$/POWEROFFTIME=/' $POWEROFFCONF else # Si el sistema está en estado de espera, ... - NOW=$(date +"%H%M") + NOW=$(date +"%s") if [ -z "$POWEROFFTIME" ]; then # Asignar tiempo de inicio, si no estaba definido. - POWEROFFTIME=$(date --date="$POWEROFFSLEEP min" +"%H%M") + 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. -- cgit v1.2.3-18-g5258 From d2c86741b9a08e6f466669b50e5658983822ece6 Mon Sep 17 00:00:00 2001 From: adv Date: Wed, 4 Jul 2018 17:56:32 +0200 Subject: #853 Adaptar libreria boot.lib para doxygen --- client/engine/Boot.lib | 87 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 58 insertions(+), 29 deletions(-) diff --git a/client/engine/Boot.lib b/client/engine/Boot.lib index 217980d1..dfbda10d 100755 --- a/client/engine/Boot.lib +++ b/client/engine/Boot.lib @@ -724,7 +724,8 @@ ps aux > /dev/null | grep $! | grep -E "T|S" | kill -9 $! > /dev/null #@date 2018-01-21 #*/ ## -function ogGrubInstallMbr { +function ogGrubInstallMbr () +{ # Variables locales. local PART DISK VERSION FIRSTAGE SECONSTAGE CHECKOS KERNELPARAM BACKUPNAME @@ -823,7 +824,8 @@ grub-install --force --root-directory=${SECONDSTAGE}${PREFIXSECONDSTAGE} $FIRSTS #@date 2012-03-13 #*/ ## -function ogGrubInstallPartition { +function ogGrubInstallPartition () +{ # Variables locales. local PART DISK VERSION FIRSTAGE SECONSTAGE CHECKOS KERNELPARAM BACKUPNAME @@ -909,7 +911,8 @@ grub-install --force --root-directory=${SECONDSTAGE}${PREFIXSECONDSTAGE} $FIRSTS #@author Antonio J. Doblas Viso. Universidad de Malaga. #@date 2016-11-03 #*/ ## -function ogConfigureFstab { +function ogConfigureFstab () +{ # Variables locales. local FSTAB DEFROOT PARTROOT DEFSWAP PARTSWAP @@ -1082,7 +1085,8 @@ MNTDIR=$(ogMount $1 $2) || return $? #*/ -function ogGrubAddOgLive () { +function ogGrubAddOgLive () +{ local TIMEOUT DIRMOUNT GRUBGFC PARTTABLETYPE NUMDISK NUMPART KERNEL STATUS NUMLINE MENUENTRY # Si se solicita, mostrar ayuda. @@ -1151,7 +1155,8 @@ MENUENTRY="menuentry "OpenGnsys" --class opengnsys --class gnu --class os { \n # ogGrubHidePartitions num_disk num_part #@see ogBootLoaderHidePartitions #*/ -function ogGrubHidePartitions { +function ogGrubHidePartitions () +{ # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME int_ndisk int_npartition" \ @@ -1166,7 +1171,8 @@ function ogGrubHidePartitions { # ogBurgHidePartitions num_disk num_part #@see ogBootLoaderHidePartitions #*/ -function ogBurgHidePartitions { +function ogBurgHidePartitions () +{ # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME int_ndisk int_npartition" \ @@ -1192,7 +1198,8 @@ function ogBurgHidePartitions { #@author Irina Gomez, ETSII Universidad de Sevilla #@date 2017-10-20 #*/ -function ogBootLoaderHidePartitions { +function ogBootLoaderHidePartitions () +{ local FUNC DIRMOUNT GFCFILE PARTTABLETYPE WINENTRY ENTRY PART TEXT LINE2 PART2 HIDDEN # Si se solicita, mostrar ayuda. @@ -1264,7 +1271,8 @@ function ogBootLoaderHidePartitions { # ogGrubDeleteEntry num_disk num_part num_disk_delete num_part_delete #@see ogBootLoaderDeleteEntry #*/ -function ogGrubDeleteEntry { +function ogGrubDeleteEntry () +{ # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME int_ndisk int_npartition int_disk_delete int_npartition_delete" \ @@ -1279,7 +1287,8 @@ function ogGrubDeleteEntry { # ogBurgDeleteEntry num_disk num_part num_disk_delete num_part_delete #@see ogBootLoaderDeleteEntry #*/ -function ogBurgDeleteEntry { +function ogBurgDeleteEntry () +{ # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME int_ndisk int_npartition int_disk_delete int_npartition_delete" \ @@ -1306,7 +1315,8 @@ function ogBurgDeleteEntry { #@author Irina Gomez, ETSII Universidad de Sevilla #@date 2017-10-20 #*/ -function ogBootLoaderDeleteEntry { +function ogBootLoaderDeleteEntry () +{ local FUNC DIRMOUNT CFGFILE DEVICE MENUENTRY DELETEENTRY ENDENTRY ENTRY # Si se solicita, mostrar ayuda. @@ -1389,7 +1399,8 @@ function ogBootLoaderDeleteEntry { #@date 2018-01-24 #*/ ## -function ogBurgInstallMbr { +function ogBurgInstallMbr () +{ # Variables locales. local PART DISK FIRSTAGE SECONSTAGE PREFIXSECONDSTAGE CHECKOS KERNELPARAM BACKUPNAME FILECFG @@ -1555,7 +1566,8 @@ burg-install --force --root-directory=${SECONDSTAGE} $FIRSTSTAGE 2>&1>/dev/null # ogGrubDefaultEntry int_disk_GRUGCFG int_partition_GRUBCFG int_disk_default_entry int_npartition_default_entry #@see ogBootLoaderDefaultEntry #*/ -function ogGrubDefaultEntry { +function ogGrubDefaultEntry () +{ # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME int_ndisk int_npartition int_disk_default_entry int_npartition_default_entry" \ @@ -1570,7 +1582,8 @@ function ogGrubDefaultEntry { # ogBurgDefaultEntry int_disk_BURGCFG int_partition_BURGCFG int_disk_default_entry int_npartition_default_entry #@see ogBootLoaderDefaultEntry #*/ -function ogBurgDefaultEntry { +function ogBurgDefaultEntry () +{ # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME int_ndisk int_npartition int_disk_default_entry int_npartition_default_entry" \ @@ -1600,7 +1613,8 @@ function ogBurgDefaultEntry { #@author Irina Gomez, ETSII Universidad de Sevilla #@date 2018-01-04 #*/ ## -function ogBootLoaderDefaultEntry { +function ogBootLoaderDefaultEntry () +{ # Variables locales. local PART CFGFILE DEFAULTENTRY MSG @@ -1663,7 +1677,8 @@ echo "${!MSG%%\.}: $@" # ogGrubOgliveDefaultEntry num_disk num_part #@see ogBootLoaderOgliveDefaultEntry #*/ -function ogGrubOgliveDefaultEntry { +function ogGrubOgliveDefaultEntry () +{ # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME int_ndiskSecondStage int_partitionSecondStage" \ @@ -1678,7 +1693,8 @@ function ogGrubOgliveDefaultEntry { # ogBurgOgliveDefaultEntry num_disk num_part #@see ogBootLoaderOgliveDefaultEntry #*/ -function ogBurgOgliveDefaultEntry { +function ogBurgOgliveDefaultEntry () +{ # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME int_ndiskSecondStage int_partitionSecondStage" \ @@ -1706,7 +1722,8 @@ function ogBurgOgliveDefaultEntry { #@author Irina Gomez, ETSII Universidad de Sevilla #@date 2018-01-04 #*/ ## -function ogBootLoaderOgliveDefaultEntry { +function ogBootLoaderOgliveDefaultEntry () +{ # Variables locales. local FUNC PART CFGFILE NUMENTRY MSG @@ -1761,7 +1778,8 @@ echo "${!MSG%%\.}: $@" # ogGrubSetTheme num_disk num_part str_theme #@see ogBootLoaderSetTheme #*/ -function ogGrubSetTheme { +function ogGrubSetTheme () +{ # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME int_ndiskSecondStage int_partitionSecondStage str_themeName" \ @@ -1777,7 +1795,8 @@ function ogGrubSetTheme { # ogBurgSetTheme num_disk num_part str_theme #@see ogBootLoaderSetTheme #*/ -function ogBurgSetTheme { +function ogBurgSetTheme () +{ # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME int_ndiskSecondStage int_partitionSecondStage str_themeName" \ @@ -1808,7 +1827,8 @@ function ogBurgSetTheme { #@author Antonio J. Doblas Viso. Universidad de Malaga #@date 2018-01-24 #*/ ## -function ogBootLoaderSetTheme { +function ogBootLoaderSetTheme () +{ # Variables locales. local FUNC PART CFGFILE THEME NEWTHEME BOOTLOADER MSG @@ -1882,7 +1902,8 @@ sed --regexp-extended -i s/"$THEME"/"$NEWTHEME"/g $CFGFILE # ogGrubSetAdminKeys num_disk num_part str_theme #@see ogBootLoaderSetTheme #*/ -function ogGrubSetAdminKeys { +function ogGrubSetAdminKeys () +{ # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME int_ndiskSecondStage int_partitionSecondStage str_bolean" \ @@ -1898,7 +1919,8 @@ function ogGrubSetAdminKeys { # ogBurgSetAdminKeys num_disk num_part str_bolean #@see ogBootLoaderSetAdminKeys #*/ -function ogBurgSetAdminKeys { +function ogBurgSetAdminKeys () +{ # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME int_ndiskSecondStage int_partitionSecondStage str_bolean" \ @@ -1927,7 +1949,8 @@ function ogBurgSetAdminKeys { #@author Antonio J. Doblas Viso. Universidad de Malaga #@date 2018-01-24 #*/ ## -function ogBootLoaderSetAdminKeys { +function ogBootLoaderSetAdminKeys () +{ # Variables locales. local FUNC PART CFGFILE BOOTLOADER BOOTLOADERDIR CFGFILE MSG @@ -1994,7 +2017,8 @@ esac # ogGrubSetTimeOut num_disk num_part int_timeout_seconds #@see ogBootLoaderSetTimeOut #*/ -function ogGrubSetTimeOut { +function ogGrubSetTimeOut () +{ # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME int_ndiskSecondStage int_partitionSecondStage int_timeout_seconds" \ @@ -2039,7 +2063,8 @@ function ogBurgSetTimeOut { #@author Antonio J. Doblas Viso. Universidad de Malaga #@date 2018-01-24 #*/ ## -function ogBootLoaderSetTimeOut { +function ogBootLoaderSetTimeOut () +{ # Variables locales. local FUNC PART CFGFILE TIMEOUT BOOTLOADER BOOTLOADERDIR CFGFILE MSG @@ -2091,7 +2116,8 @@ sed -i s/timeout=.*$/timeout=$TIMEOUT/g $CFGFILE # ogGrubSetResolution num_disk num_part int_resolution #@see ogBootLoaderSetResolution #*/ -function ogGrubSetResolution { +function ogGrubSetResolution () +{ # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME int_ndiskSecondStage int_partitionSecondStage [str_resolution]" \ @@ -2108,7 +2134,8 @@ function ogGrubSetResolution { # ogBurgSetResolution num_disk num_part str_bolean #@see ogBootLoaderSetResolution #*/ -function ogBurgSetResolution { +function ogBurgSetResolution () + { # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME int_ndiskSecondStage int_partitionSecondStage [str_resolution]" \ @@ -2137,7 +2164,8 @@ function ogBurgSetResolution { #@author Antonio J. Doblas Viso. Universidad de Malaga #@date 2018-01-24 #*/ ## -function ogBootLoaderSetResolution { +function ogBootLoaderSetResolution () +{ # Variables locales. local FUNC PART CFGFILE RESOLUTION NEWRESOLUTION DEFAULTRESOLUTION BOOTLOADER BOOTLOADERDIR CFGFILE MSG @@ -2231,7 +2259,8 @@ sed -i s/gfxmode=.*$/gfxmode=$NEWRESOLUTION/g $CFGFILE #@author Juan Carlos Garcia. Universidad de ZAragoza. #@date 2017-06-26 #*/ ## -function ogRefindInstall { +function ogRefindInstall () +{ # Variables locales. local DISK EFIDIR CONFIG EFIPARTITIONID -- cgit v1.2.3-18-g5258 From 872b044f789626b5532748c88fd9d26f551f0c3d Mon Sep 17 00:00:00 2001 From: adv Date: Thu, 5 Jul 2018 01:11:58 +0200 Subject: #853 Adapting Boot.lib library for doxygen --- client/engine/Boot.lib | 85 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 54 insertions(+), 31 deletions(-) diff --git a/client/engine/Boot.lib b/client/engine/Boot.lib index dfbda10d..e9ddf38e 100755 --- a/client/engine/Boot.lib +++ b/client/engine/Boot.lib @@ -625,6 +625,8 @@ ps aux > /dev/null | grep $! | grep -E "T|S" | kill -9 $! > /dev/null } + +#/** # ogWindowsRegisterPartition int_ndisk int_partiton str_volume int_disk int_partition #@brief Registra una partición en windows con un determinado volumen. #@param int_ndisk nº de orden del disco a registrar @@ -699,7 +701,7 @@ ps aux > /dev/null | grep $! | grep -E "T|S" | kill -9 $! > /dev/null } - +#/** # ogGrubInstallMbr int_disk_GRUBCFG int_partition_GRUBCFG #@brief Instala el grub el el MBR del primer disco duro (FIRSTSTAGE). El fichero de configuración grub.cfg ubicado según parametros disk y part(SECONDSTAGE). Admite sistemas Windows. #@param int_disk_SecondStage @@ -804,7 +806,7 @@ grub-install --force --root-directory=${SECONDSTAGE}${PREFIXSECONDSTAGE} $FIRSTS } - +#/** # ogGrubInstallPartition int_disk_SECONDSTAGE int_partition_SECONDSTAGE bolean_Check_Os_installed_and_Configure_2ndStage #@brief Instala y actualiza el gestor grub en el bootsector de la particion indicada #@param int_disk_SecondStage @@ -955,9 +957,7 @@ fi } -### -#En pruebas -## + #/** # ogSetLinuxName int_ndisk int_nfilesys [str_name] #@brief Establece el nombre del equipo en los ficheros hostname y hosts. @@ -1081,9 +1081,7 @@ MNTDIR=$(ogMount $1 $2) || return $? #@author Antonio J. Doblas Viso. Universidad de Malaga. #@date 2017-06-17 #*/ ## -#*/ ## -#*/ function ogGrubAddOgLive () { @@ -1153,8 +1151,9 @@ MENUENTRY="menuentry "OpenGnsys" --class opengnsys --class gnu --class os { \n #/** # ogGrubHidePartitions num_disk num_part +#@brief ver ogBootLoaderHidePartitions #@see ogBootLoaderHidePartitions -#*/ +#*/ ## function ogGrubHidePartitions () { # Si se solicita, mostrar ayuda. @@ -1169,8 +1168,9 @@ function ogGrubHidePartitions () #/** # ogBurgHidePartitions num_disk num_part +#@brief ver ogBootLoaderHidePartitions #@see ogBootLoaderHidePartitions -#*/ +#*/ ## function ogBurgHidePartitions () { # Si se solicita, mostrar ayuda. @@ -1197,7 +1197,11 @@ function ogBurgHidePartitions () #@version 1.1 Se generaliza la función para grub y burg #@author Irina Gomez, ETSII Universidad de Sevilla #@date 2017-10-20 +#@version 1.1.1 Se incluye comentarios en codigo para autodocuemtnacion con Doxygen +#@author Antonio J. Doblas Viso, EVLT Univesidad de Malaga. +#@date 2018-07-05 #*/ + function ogBootLoaderHidePartitions () { local FUNC DIRMOUNT GFCFILE PARTTABLETYPE WINENTRY ENTRY PART TEXT LINE2 PART2 HIDDEN @@ -1241,9 +1245,10 @@ function ogBootLoaderHidePartitions () sed -i '/parttool/d' $CFGFILE PARTTABLETYPE=$(ogGetPartitionTableType $1 | tr [:upper:] [:lower:]) - +# /* (comentario de bloque para Doxygen) # Entradas de Windows: numero de linea y particion. De mayor a menor. WINENTRY=$(awk '/menuentry.*Windows/ {gsub(/\)\"/, ""); print NR":"$6} ' $CFGFILE | sed -e '1!G;h;$!d' -e s/[a-z\/]//g) + #*/ (comentario para bloque Doxygen) # Particiones de Windows, pueden no estar en el grub. WINPART=$(fdisk -l $(ogDiskToDev $1)|awk '/NTFS/ {print substr($1,9,1)}' |sed '1!G;h;$!d') # Modifico todas las entradas de Windows. @@ -1269,7 +1274,8 @@ function ogBootLoaderHidePartitions () #/** # ogGrubDeleteEntry num_disk num_part num_disk_delete num_part_delete -#@see ogBootLoaderDeleteEntry +#@brief ver ogBootLoaderDeleteEntry +#@see ogBootLoaderDeleteEntry #*/ function ogGrubDeleteEntry () { @@ -1285,6 +1291,7 @@ function ogGrubDeleteEntry () #/** # ogBurgDeleteEntry num_disk num_part num_disk_delete num_part_delete +#@brief ver ogBootLoaderDeleteEntry #@see ogBootLoaderDeleteEntry #*/ function ogBurgDeleteEntry () @@ -1314,7 +1321,8 @@ function ogBurgDeleteEntry () #@version 1.1 Se generaliza la función para grub y burg #@author Irina Gomez, ETSII Universidad de Sevilla #@date 2017-10-20 -#*/ +#*/ ## + function ogBootLoaderDeleteEntry () { local FUNC DIRMOUNT CFGFILE DEVICE MENUENTRY DELETEENTRY ENDENTRY ENTRY @@ -1378,7 +1386,7 @@ function ogBootLoaderDeleteEntry () done } - +#/** # ogBurgInstallMbr int_disk_GRUBCFG int_partition_GRUBCFG #@param bolean_Check_Os_installed_and_Configure_2ndStage true | false[default] #@brief Instala y actualiza el gestor grub en el MBR del disco duro donde se encuentra el fichero grub.cfg. Admite sistemas Windows. @@ -1397,6 +1405,9 @@ function ogBootLoaderDeleteEntry () #@version 1.1.0 - Refactorizar fichero de configuacion #@author Antonio J. Doblas Viso. Universidad de Malaga. #@date 2018-01-24 +#@version 1.1.1 - Se incluye comentarios en codigo para autodocuemtnacion con Doxygen +#@author Antonio J. Doblas Viso. Universidad de Malaga. +#@date 2018-07-05 #*/ ## function ogBurgInstallMbr () @@ -1433,7 +1444,7 @@ FIRSTSTAGE=$(ogDiskToDev 1) SECONDSTAGE=$(ogMount $DISK $PART) # prepara el directorio principal de la segunda etapa (y copia los binarios) -[ -d ${SECONDSTAGE}/boot/burg/ ] || mkdir -p ${SECONDSTAGE}/boot/burg/; cp -prv /boot/burg/* ${SECONDSTAGE}/boot/burg/ 2>&1>/dev/null; cp -prv $OGLIB/burg/* ${SECONDSTAGE}/boot/burg/ 2>&1>/dev/null; +[ -d ${SECONDSTAGE}/boot/burg/ ] || mkdir -p ${SECONDSTAGE}/boot/burg/; cp -prv /boot/burg/* ${SECONDSTAGE}/boot/burg/ 2>&1>/dev/null; cp -prv $OGLIB/burg/* ${SECONDSTAGE}/boot/burg/ 2>&1>/dev/null; #*/ ## (comentario Dogygen) #*/ ## (comentario Dogygen) #Copiamos el tema mkdir -p ${SECONDSTAGE}/boot/burg/themes/OpenGnsys @@ -1470,6 +1481,7 @@ mkdir -p ${SECONDSTAGE}${PREFIXSECONDSTAGE}/boot/burg/ FILECFG=${SECONDSTAGE}${PREFIXSECONDSTAGE}/boot/burg/burg.cfg +#/* ## (comentario Dogygen) cat > "$FILECFG" << EOF set theme_name=OpenGnsys @@ -1552,7 +1564,7 @@ fi EOF - +#*/ ## (comentario Dogygen) #Preparar configuración segunda etapa: crear entrada del sistema operativo grubSyntax "$KERNELPARAM" >> "$FILECFG" @@ -1564,8 +1576,9 @@ burg-install --force --root-directory=${SECONDSTAGE} $FIRSTSTAGE 2>&1>/dev/null #/** # ogGrubDefaultEntry int_disk_GRUGCFG int_partition_GRUBCFG int_disk_default_entry int_npartition_default_entry +#@brief ver ogBootLoaderDefaultEntry #@see ogBootLoaderDefaultEntry -#*/ +#*/ ## function ogGrubDefaultEntry () { # Si se solicita, mostrar ayuda. @@ -1580,8 +1593,9 @@ function ogGrubDefaultEntry () #/** # ogBurgDefaultEntry int_disk_BURGCFG int_partition_BURGCFG int_disk_default_entry int_npartition_default_entry +#@brief ver ogBootLoaderDefaultEntry #@see ogBootLoaderDefaultEntry -#*/ +#*/ ## function ogBurgDefaultEntry () { # Si se solicita, mostrar ayuda. @@ -1666,17 +1680,16 @@ DEFAULTENTRY=$(grep -n -m 1 menuentry.*$DEVICE $CFGFILE| cut -d: -f1) MENUENTRY="$(grep -n -e menuentry $CFGFILE| cut -d: -f1 | grep -n $DEFAULTENTRY |cut -d: -f1)" # Las líneas empiezan a contar desde cero let MENUENTRY=$MENUENTRY-1 - sed --regexp-extended -i s/"set default=\"?[0-9]*\"?"/"set default=\"$MENUENTRY\""/g $CFGFILE - MSG="MSG_HELP_$FUNC" echo "${!MSG%%\.}: $@" } #/** # ogGrubOgliveDefaultEntry num_disk num_part +#@brief ver ogBootLoaderOgliveDefaultEntry #@see ogBootLoaderOgliveDefaultEntry -#*/ +#*/ ## function ogGrubOgliveDefaultEntry () { # Si se solicita, mostrar ayuda. @@ -1691,8 +1704,9 @@ function ogGrubOgliveDefaultEntry () #/** # ogBurgOgliveDefaultEntry num_disk num_part +#@brief ver ogBootLoaderOgliveDefaultEntry #@see ogBootLoaderOgliveDefaultEntry -#*/ +#*/ ## function ogBurgOgliveDefaultEntry () { # Si se solicita, mostrar ayuda. @@ -1776,8 +1790,9 @@ echo "${!MSG%%\.}: $@" #/** # ogGrubSetTheme num_disk num_part str_theme +#@brief ver ogBootLoaderSetTheme #@see ogBootLoaderSetTheme -#*/ +#*/ ## function ogGrubSetTheme () { # Si se solicita, mostrar ayuda. @@ -1793,8 +1808,9 @@ function ogGrubSetTheme () #/** # ogBurgSetTheme num_disk num_part str_theme +#@brief ver ogBootLoaderSetTheme #@see ogBootLoaderSetTheme -#*/ +#*/ ## function ogBurgSetTheme () { # Si se solicita, mostrar ayuda. @@ -1900,8 +1916,9 @@ sed --regexp-extended -i s/"$THEME"/"$NEWTHEME"/g $CFGFILE #/** # ogGrubSetAdminKeys num_disk num_part str_theme +#@brief ver ogBootLoaderSetTheme #@see ogBootLoaderSetTheme -#*/ +#*/ ## function ogGrubSetAdminKeys () { # Si se solicita, mostrar ayuda. @@ -1917,8 +1934,9 @@ function ogGrubSetAdminKeys () #/** # ogBurgSetAdminKeys num_disk num_part str_bolean +#@brief ver ogBootLoaderSetAdminKeys #@see ogBootLoaderSetAdminKeys -#*/ +#*/ ## function ogBurgSetAdminKeys () { # Si se solicita, mostrar ayuda. @@ -2015,8 +2033,9 @@ esac #/** # ogGrubSetTimeOut num_disk num_part int_timeout_seconds +#@brief ver ogBootLoaderSetTimeOut #@see ogBootLoaderSetTimeOut -#*/ +#*/ ## function ogGrubSetTimeOut () { # Si se solicita, mostrar ayuda. @@ -2032,9 +2051,11 @@ function ogGrubSetTimeOut () #/** # ogBurgSetTimeOut num_disk num_part str_bolean +#@brief ver ogBootLoaderSetTimeOut #@see ogBootLoaderSetTimeOut -#*/ -function ogBurgSetTimeOut { +#*/ ## +function ogBurgSetTimeOut () +{ # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME int_ndiskSecondStage int_partitionSecondStage str_timeout_seconds" \ @@ -2114,8 +2135,9 @@ sed -i s/timeout=.*$/timeout=$TIMEOUT/g $CFGFILE #/** # ogGrubSetResolution num_disk num_part int_resolution +#@brief ver ogBootLoaderSetResolution #@see ogBootLoaderSetResolution -#*/ +#*/ ## function ogGrubSetResolution () { # Si se solicita, mostrar ayuda. @@ -2132,8 +2154,9 @@ function ogGrubSetResolution () #/** # ogBurgSetResolution num_disk num_part str_bolean +#@brief ver ogBootLoaderSetResolution #@see ogBootLoaderSetResolution -#*/ +#*/ ## function ogBurgSetResolution () { # Si se solicita, mostrar ayuda. @@ -2248,7 +2271,7 @@ fi sed -i s/gfxmode=.*$/gfxmode=$NEWRESOLUTION/g $CFGFILE } - +#/** # ogRefindInstall int_ndisk bool_autoconfig #@brief Instala y actualiza el gestor rEFInd en la particion EFI #@param int_ndisk -- cgit v1.2.3-18-g5258 From 62d6dd59b1fefce1d5396a1c916998ba91f4d008 Mon Sep 17 00:00:00 2001 From: adv Date: Thu, 5 Jul 2018 11:52:57 +0200 Subject: #853 Adapting File.lib library for doxygen --- client/engine/File.lib | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/client/engine/File.lib b/client/engine/File.lib index f37e947d..1be1a338 100755 --- a/client/engine/File.lib +++ b/client/engine/File.lib @@ -229,7 +229,11 @@ rm -fr "$DIR" || ogRaiseError $OG_ERR_NOTFOUND "$*" || return $? #@version 0.9 - Pruebas con OpenGnSys. #@author Ramon Gomez, ETSII Universidad de Sevilla #@date 2009-09-15 +#@version 1.1.1 - Correccion comentarios autodocumentacion doxygen . +#@author Antonio J. Doblas Viso. Universidad de Malaga +#@date 2018-07-05 #*/ ## + function ogGetPath () { # Variables locales. @@ -266,7 +270,7 @@ case $# in esac # Eliminar caracteres \c / duplicados y finales. - # /* (comentario Doxygen) + FILE="$(echo $FILE|sed -e 's/\(\/\)*\1/\//g; s/\/$//')" # Comprobar si existe el fichero para reducir tiempos. if [ -e "$FILE" ]; then @@ -274,13 +278,14 @@ if [ -e "$FILE" ]; then else # Buscar el nombre correcto en cada subdirectorio del camino. FILEPATH="/" + while [ "$FILE" != "$PREVFILE" ]; do - FILEPATH="$(ls -d "${FILEPATH%/}/${FILE%%/*}" 2>/dev/null || find "$FILEPATH" -maxdepth 1 -iname "${FILE%%/*}" -print 2>/dev/null)" + FILEPATH="$(ls -d "${FILEPATH%/}/${FILE%%/*}" 2>/dev/null || find "$FILEPATH" -maxdepth 1 -iname "${FILE%%/*}" -print 2>/dev/null)" #*/ (Comentario Doxygen) PREVFILE="$FILE" - FILE="${FILE#*/}" + FILE="${FILE#*/}" done + fi - # (comentario Doxygen) */ [ -n "$FILEPATH" ] && echo "$FILEPATH" return 0 } @@ -294,6 +299,7 @@ return 0 #@author Ramon Gomez, ETSII Universidad de Sevilla #@date 2009-09-29 #*/ ## + function ogGetParentPath () { local PARENT -- cgit v1.2.3-18-g5258 From d01525bd830f71c8ff9fe013a574a96a6622402b Mon Sep 17 00:00:00 2001 From: adv Date: Thu, 5 Jul 2018 12:52:50 +0200 Subject: #853 Adapting FileSystem.lib library for doxygen --- client/engine/FileSystem.lib | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/client/engine/FileSystem.lib b/client/engine/FileSystem.lib index 868642fd..0642a854 100755 --- a/client/engine/FileSystem.lib +++ b/client/engine/FileSystem.lib @@ -602,7 +602,8 @@ test -n "$(ogGetMountPoint $1 $2)" #@version 1.1.0 - Primera versión para OpenGnsys. #@author Ramon Gomez, ETSII Universidad de Sevilla #@date 2016-01-20 -#/** +#*/ ## + function ogIsReadonly () { # Variables locales @@ -631,7 +632,7 @@ test -n "$(findmnt -n -o OPTIONS $PART | awk 'BEGIN {RS=","} /^ro$/ {print}')" #@version 1.0.5 - Primera versión para OpenGnSys. #@author Ramon Gomez, ETSII Universidad de Sevilla #@date 2013-10-09 -#/** +#*/ ## function ogIsWritable () { # Variables locales @@ -1145,8 +1146,23 @@ case "$(ogGetFsType $1 $2)" in esac } -# AVISO: Componer corretcamente esta función. -function ogGetFreeSize () { + +#/** +# ogGetFreeSize int_disco int_partition str_SizeOutput +#@brief muestra informacion del tamaño total, datos y libre. +#@param int_ndisk nº de orden del disco +#@param int_npart nº de orden de partición +#@param str_unitSize unidad mostrada +#@return int_size:int_data:int_free +#@TODO Componer corretcamente esta función. +#@exception OG_ERR_FORMAT Formato incorrecto. +#@version +#@author +#@date +#*/ ## + +function ogGetFreeSize () +{ local particion unit factor valor if [ $# = 0 ] then -- cgit v1.2.3-18-g5258 From 01ae374d4e8099b0d3c87dce8e0a8c44856bdf4f Mon Sep 17 00:00:00 2001 From: Fredy Date: Thu, 5 Jul 2018 13:16:35 +0200 Subject: Added main repo interface parameter to sendFileMcast script to solve problems when more than one interface are available --- repoman/bin/getRepoIface | 9 +++++++++ repoman/bin/sendFileMcast | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 repoman/bin/getRepoIface diff --git a/repoman/bin/getRepoIface b/repoman/bin/getRepoIface new file mode 100755 index 00000000..2ce208be --- /dev/null +++ b/repoman/bin/getRepoIface @@ -0,0 +1,9 @@ +#!/bin/bash + +# This script takes the IPlocal variable of the repository +# and returns the system interface +# Alfredo Luque + +source /opt/opengnsys/etc/ogAdmRepo.cfg + +ip addr show | grep $IPlocal | cut -f2 | awk '{ print $NF }' diff --git a/repoman/bin/sendFileMcast b/repoman/bin/sendFileMcast index ac6446d8..222a6d40 100755 --- a/repoman/bin/sendFileMcast +++ b/repoman/bin/sendFileMcast @@ -9,7 +9,8 @@ OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"} OGIMG=$OPENGNSYS/images OGBIN=$OPENGNSYS/bin PATH=$PATH:$OGBIN - +REPO_IFACE="$(/opt/opengnsys/bin/getRepoIface)" + # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then echo "Formato: $PROG fichero|nombreImagen datosMulticast" @@ -57,5 +58,5 @@ CERROR="8x8/128" # Envío de fichero por Multicast. # Se desabilita el uso de mbuffer: eesta versión del upd-sender no la admite. #which mbuffer &> /dev/null && MBUFFER="--pipe 'mbuffer -m 20M'" -$OGBIN/udp-sender $MBUFFER --nokbd --retries-until-drop 65 --portbase $PORTBASE --$METHOD --mcast-data-address $ADDRESS --fec $CERROR --max-bitrate $BITRATE --ttl 16 --min-clients $NCLIENTS --max-wait $MAXTIME --file "$FICHIMG" +$OGBIN/udp-sender $MBUFFER --nokbd --retries-until-drop 65 --portbase $PORTBASE --$METHOD --interface $REPO_IFACE --mcast-data-address $ADDRESS --fec $CERROR --max-bitrate $BITRATE --ttl 16 --min-clients $NCLIENTS --max-wait $MAXTIME --file "$FICHIMG" -- cgit v1.2.3-18-g5258 From 9c811246d40a137e6f0455f1ab854242c9f849fa Mon Sep 17 00:00:00 2001 From: adv Date: Thu, 5 Jul 2018 14:09:22 +0200 Subject: #853 Adapting Image.lib library for doxygen --- client/engine/Image.lib | 61 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/client/engine/Image.lib b/client/engine/Image.lib index 092befed..20e7f7df 100755 --- a/client/engine/Image.lib +++ b/client/engine/Image.lib @@ -664,6 +664,8 @@ IMGFILE=$(ogGetPath "$1" "$2.$IMGTYPE") # comprobamos consistencia de la imagen ogGetImageInfo $IMGFILE >/dev/null || return $(ogRaiseError $OG_ERR_IMAGE " $1 $2"; echo $?) + +#/* (Comienzo comentario Doxygen) # Error si la imagen no cabe en la particion. #IMGSIZE=$(ogGetImageSize "$1" "$2") || return $(ogRaiseError $OG_ERR_IMAGE " $1 $2"; echo $?) #DISKSIZE=$(ogGetDiskSize $3) @@ -671,6 +673,8 @@ ogGetImageInfo $IMGFILE >/dev/null || return $(ogRaiseError $OG_ERR_IMAGE " $1 # ogRaiseError $OG_ERR_IMGSIZEPARTITION "$DISKSIZE < $IMGSIZE" # return $? #fi +#*/ (Fin comentario Doxygen) + # Comprobar el bloqueo de la imagen y de la partición. if ogIsImageLocked "$IMGFILE"; then ogRaiseError $OG_ERR_LOCKED "$MSG_IMAGE $1, $2.$IMGTYPE" @@ -1002,6 +1006,20 @@ else fi } +#/** +# ogGetImageProgram str_REPO str_imagen +#@brief muestra información sobre la imagen monolitica. +#@see ogGetImageInfo +#@param 1 REPO o CACHE contenedor de la imagen +#@param 2 filename nombre de la imagen sin extension +#@return nombre del programa usado para generar la imagen +#@exception OG_ERR_FORMAT formato incorrecto. +#@exception OG_ERR_NOTFOUND fichero no encontrado. +#@note ogGetImageProgram REPO imagenA -> partclone +#@version 1.0 - Primeras pruebas +#@author Antonio J. Doblas Viso. Universidad de Málaga +#@date 2010/02/08 +#*/ ## function ogGetImageProgram () { @@ -1019,7 +1037,20 @@ IMGFILE=$(ogGetPath "$1" "$2.img") ogGetImageInfo $IMGFILE | awk -F: '{print $1}' } - +#/** +# ogGetImageCompressor str_REPO str_imagen +#@brief muestra información sobre la imagen monolitica. +#@see ogGetImageInfo +#@param 1 REPO o CACHE contenedor de la imagen +#@param 2 filename nombre de la imagen sin extension +#@return tipo de compresión usada al generar la imagen +#@exception OG_ERR_FORMAT formato incorrecto. +#@exception OG_ERR_NOTFOUND fichero no encontrado. +#@note ogGetImageCompressor REPO imagenA -> lzop +#@version 1.0 - Primeras pruebas +#@author Antonio J. Doblas Viso. Universidad de Málaga +#@date 2010/02/08 +#*/ ## function ogGetImageCompressor () { local IMGFILE @@ -1037,6 +1068,20 @@ ogGetImageInfo $IMGFILE | awk -F: '{print $2}' } +#/** +# ogGetImageType str_REPO str_imagen +#@brief muestra información sobre el sistema de archivos de imagen monolitica. +#@see ogGetImageInfo +#@param 1 REPO o CACHE contenedor de la imagen +#@param 2 filename nombre de la imagen sin extension +#@return tipo de compresión usada al generar la imagen +#@exception OG_ERR_FORMAT formato incorrecto. +#@exception OG_ERR_NOTFOUND fichero no encontrado. +#@note ogGetImageType REPO imagenA -> NTFS +#@version 1.0 - Primeras pruebas +#@author Antonio J. Doblas Viso. Universidad de Málaga +#@date 2010/02/08 +#*/ ## function ogGetImageType () { local IMGFILE @@ -1054,6 +1099,20 @@ ogGetImageInfo $IMGFILE | awk -F: '{print $3}' } +#/** +# ogGetImageSize str_REPO str_imagen +#@brief muestra información sobre el tamaño (KB) del sistema de archivos de imagen monolitica. +#@see ogGetImageInfo +#@param 1 REPO o CACHE contenedor de la imagen +#@param 2 filename nombre de la imagen sin extension +#@return tipo de compresión usada al generar la imagen +#@exception OG_ERR_FORMAT formato incorrecto. +#@exception OG_ERR_NOTFOUND fichero no encontrado. +#@note ogGetImagesize REPO imagenA -> 56432234 > Kb +#@version 1.0 - Primeras pruebas +#@author Antonio J. Doblas Viso. Universidad de Málaga +#@date 2010/02/08 +#*/ ## function ogGetImageSize () { # Variables locales -- cgit v1.2.3-18-g5258 From 35acc61321525ff3096eabc6a78be3eec00c20c2 Mon Sep 17 00:00:00 2001 From: adv Date: Thu, 5 Jul 2018 17:22:07 +0200 Subject: Adapting Inventory.lib library for doxygen --- client/engine/Inventory.lib | 327 ++++++++++++++++++++++---------------------- 1 file changed, 165 insertions(+), 162 deletions(-) diff --git a/client/engine/Inventory.lib b/client/engine/Inventory.lib index c2861411..853f0d18 100755 --- a/client/engine/Inventory.lib +++ b/client/engine/Inventory.lib @@ -90,168 +90,6 @@ esac } -#/** -# ogGetOsVersion int_ndisk int_nfilesys -#@brief Devuelve la versión del sistema operativo instalado en un sistema de archivos. -#@param int_ndisk nº de orden del disco -#@param int_nfilesys nº de orden de la partición -#@return OSType:OSVersion - tipo y versión del sistema operativo. -#@note OSType = { Android, BSD, GrubLoader, Hurd, Linux, MacOS, Solaris, Windows, WinLoader } -#@note Requisitos: awk, head, chroot -#@exception OG_ERR_FORMAT Formato incorrecto. -#@exception OG_ERR_NOTFOUND Disco o partición no corresponden con un dispositiv -#@exception OG_ERR_PARTITION Fallo al montar el sistema de archivos. -#@version 0.9 - Primera versión para OpenGnSys -#@author Ramon Gomez, ETSII Universidad de Sevilla -#@date 2009-09-15 -#@version 1.0.4 - Incluir tipos BSD, MacOS y Solaris. -#@author Ramon Gomez, ETSII Universidad de Sevilla -#@date 2012-06-29 -#@version 1.0.5 - Incluir tipos GrubLoader, Hurd y WinLoader, leer por defecto fichero /etc/os-release. -#@author Ramon Gomez, ETSII Universidad de Sevilla -#@date 2013-10-07 -#@version 1.0.6 - Detectar GrubLoader al final y sistemas basados en EFI. -#@author Ramon Gomez, ETSII Universidad de Sevilla -#@date 2014-08-27 -#*/ ## -function ogGetOsVersion () -{ -# Variables locales. -local MNTDIR TYPE DISTRIB VERSION IS64BIT FILE -# Si se solicita, mostrar ayuda. -if [ "$*" == "help" ]; then - ogHelp "$FUNCNAME" "$FUNCNAME int_ndisk int_nfilesys" \ - "$FUNCNAME 1 2 => Linux:Ubuntu precise (12.04 LTS) 64 bits" - return -fi -# Error si no se reciben 2 parametros. -[ $# = 2 ] || ogRaiseError $OG_ERR_FORMAT || return $? - -# Montar la particion, si no lo estaba previamente. -MNTDIR=$(ogMount $1 $2) || return $? - -# Buscar tipo de sistema operativo. -# Para GNU/Linux: leer descripción. -TYPE="Linux" -FILE="$MNTDIR/etc/os-release" -[ -r $FILE ] && VERSION="$(awk -F= '$1~/PRETTY_NAME/ {gsub(/\"/,"",$2); print $2}' $FILE)" -# Si no se puede obtener, buscar en ficheros del sistema. -if [ -z "$VERSION" ]; then - FILE="$MNTDIR/etc/lsb-release" - [ -r $FILE ] && VERSION="$(awk -F= '$1~/DESCRIPTION/ {gsub(/\"/,"",$2); print $2}' $FILE)" - for DISTRIB in redhat SuSE mandrake gentoo; do - FILE="$MNTDIR/etc/${DISTRIB}-release" - [ -r $FILE ] && VERSION="$(head -1 $FILE)" - done - FILE="$MNTDIR/etc/arch-release" - [ -r $FILE ] && VERSION="Arch Linux" - FILE="$MNTDIR/etc/slackware-version" - [ -r $FILE ] && VERSION="Slackware $(cat $FILE)" -fi -# Si no se encuentra, intentar ejecutar "lsb_release". -[ -z "$VERSION" ] && VERSION=$(chroot $MNTDIR lsb_release -d 2>/dev/null | awk -F":\t" '{print $2}') -# Comprobar Linux de 64 bits. -[ -n "$VERSION" ] && [ -e $MNTDIR/lib64 ] && IS64BIT="$MSG_64BIT" -# Para Android, leer fichero de propiedades. -if [ -z "$VERSION" ]; then - TYPE="Android" - FILE="$MNTDIR/android*/system/build.prop" - [ -r $FILE ] && VERSION="Android $(awk -F= '$1~/(product.brand|build.version.release)/ {print $2}' $FILE | tr '\n' ' ')" - [ -e $MNTDIR/lib64 ] && IS64BIT="$MSG_64BIT" -fi -# Para GNU/Hurd, comprobar fichero de inicio (basado en os-prober). -if [ -z "$VERSION" ]; then - TYPE="Hurd" - FILE="$MNTDIR/hurd/init" - [ -r $FILE ] && VERSION="GNU/Hurd" -fi -# Para Windows: leer la version del registro. -if [ -z "$VERSION" ]; then - TYPE="Windows" - FILE="$(ogGetHivePath $MNTDIR SOFTWARE)" - if [ -n "$FILE" ]; then - # Nuevo método más rápido para acceder al registro de Windows.. - VERSION=$(echo $(hivexsh << EOT 2>/dev/null -load $FILE -cd \Microsoft\Windows NT\CurrentVersion -lsval ProductName -lsval ReleaseId -EOT - )) - [ -n "$(reglookup -H -p "Microsoft/Windows/CurrentVersion/ProgramW6432Dir" "$FILE" 2>/dev/null)" ] && IS64BIT="$MSG_64BIT" - if [ -z "$VERSION" ]; then - # Compatibilidad con métrodo antiguo y más lento de acceder al registro. - VERSION=$(ogGetRegistryValue $MNTDIR software '\Microsoft\Windows NT\CurrentVersion\ProductName' 2>/dev/null) - [ -n "$(ogGetRegistryValue $MNTDIR software '\Microsoft\Windows\CurrentVersion\ProgramW6432Dir' 2>/dev/null)" ] && IS64BIT="$MSG_64BIT" - fi - fi -fi -# Para cargador Windows: buscar versión en fichero BCD (basado en os-prober). -if [ -z "$VERSION" ]; then - TYPE="WinLoader" - FILE="$(ogGetPath $MNTDIR/boot/bcd)" - [ -z "$FILE" ] && FILE="$(ogGetPath $MNTDIR/EFI/Microsoft/boot/bcd)" - if [ -n "$FILE" ]; then - for DISTRIB in "Windows Recovery" "Windows Boot"; do - if grep -aqs "$(echo "$DISTRIB" | sed 's/./&./g')" $FILE; then - VERSION="$DISTRIB loader" - fi - done - fi -fi -# Para macOS: detectar kernel y completar con fichero plist de información del sistema. -if [ -z "$VERSION" ]; then - TYPE="MacOS" - # Kernel de Mac OS (no debe ser fichero de texto). - FILE="$MNTDIR/mach_kernel" - if [ -z "$(file -b $FILE | grep 'text')" ]; then - # Obtener tipo de kernel. - [ -n "$(file -b $FILE | grep 'Mach-O')" ] && VERSION="macOS" - [ -n "$(file -b $FILE | grep 'Mach-O 64-bit')" ] && IS64BIT="$MSG_64BIT" - # Datos de configuración de versión de Mac OS. - FILE="$MNTDIR/System/Library/CoreServices/SystemVersion.plist" - [ -r $FILE ] && VERSION=$(awk -F"[<>]" ' - /ProductName/ {getline;s=$3} - /ProductVersion/ {getline;v=$3} - END {print s,v}' $FILE) - # Datos de recuperación de macOS. - FILE="$MNTDIR/com.apple.recovery.boot" - [ -r $FILE -a -n "$VERSION" ] && VERSION="$VERSION recovery" - fi -fi -# Para FreeBSD: obtener datos del Kernel. -### TODO Revisar solución. -if [ -z "$VERSION" ]; then - TYPE="BSD" - FILE="$MNTDIR/boot/kernel/kernel" - if [ -r $FILE ]; then - VERSION="$(strings $FILE|awk '/@.*RELEASE/ {sub(/@\(#\)/,""); print $1,$2}')" - [ -n "$(file -b $FILE | grep 'x86-64')" ] && IS64BIT="$MSG_64BIT" - fi -fi -# Para Solaris: leer el fichero de versión. -### TODO Revisar solución. -if [ -z "$VERSION" ]; then - TYPE="Solaris" - FILE="$MNTDIR/etc/release" - [ -r $FILE ] && VERSION="$(head -1 $FILE)" -fi -# Para cargador GRUB, comprobar fichero de configuración. -if [ -z "$VERSION" ]; then - TYPE="GrubLoader" - for FILE in $MNTDIR/{,boot/}grub/menu.lst; do - [ -r $FILE ] && VERSION="GRUB Loader" - done - for FILE in $MNTDIR/{,boot/}{grub{,2},EFI/*}/grub.cfg; do - [ -r $FILE ] && VERSION="GRUB2 Loader" - done -fi - -# Mostrar resultado y salir sin errores. -[ -n "$VERSION" ] && echo "$TYPE:$VERSION $IS64BIT" -return 0 -} - #/** # ogGetSerialNumber @@ -259,6 +97,8 @@ return 0 #@version 1.1.0 - Primeras versión con OpenGnsys #@author Ramon Gomez, ETSII Universidad de Sevilla #@date 2015-06-08 +#*/ ## + function ogGetSerialNumber () { # Si se solicita, mostrar ayuda. @@ -497,3 +337,166 @@ for k in db.keys(): return $? ;; esac } + +#/** +# ogGetOsVersion int_ndisk int_nfilesys +#@brief Devuelve la versión del sistema operativo instalado en un sistema de archivos. +#@param int_ndisk nº de orden del disco +#@param int_nfilesys nº de orden de la partición +#@return OSType:OSVersion - tipo y versión del sistema operativo. +#@note OSType = { Android, BSD, GrubLoader, Hurd, Linux, MacOS, Solaris, Windows, WinLoader } +#@note Requisitos: awk, head, chroot +#@exception OG_ERR_FORMAT Formato incorrecto. +#@exception OG_ERR_NOTFOUND Disco o partición no corresponden con un dispositiv +#@exception OG_ERR_PARTITION Fallo al montar el sistema de archivos. +#@version 0.9 - Primera versión para OpenGnSys +#@author Ramon Gomez, ETSII Universidad de Sevilla +#@date 2009-09-15 +#@version 1.0.4 - Incluir tipos BSD, MacOS y Solaris. +#@author Ramon Gomez, ETSII Universidad de Sevilla +#@date 2012-06-29 +#@version 1.0.5 - Incluir tipos GrubLoader, Hurd y WinLoader, leer por defecto fichero /etc/os-release. +#@author Ramon Gomez, ETSII Universidad de Sevilla +#@date 2013-10-07 +#@version 1.0.6 - Detectar GrubLoader al final y sistemas basados en EFI. +#@author Ramon Gomez, ETSII Universidad de Sevilla +#@date 2014-08-27 +#*/ ## +function ogGetOsVersion () +{ +# Variables locales. +local MNTDIR TYPE DISTRIB VERSION IS64BIT FILE +# Si se solicita, mostrar ayuda. +if [ "$*" == "help" ]; then + ogHelp "$FUNCNAME" "$FUNCNAME int_ndisk int_nfilesys" \ + "$FUNCNAME 1 2 => Linux:Ubuntu precise (12.04 LTS) 64 bits" + return +fi +# Error si no se reciben 2 parametros. +[ $# = 2 ] || ogRaiseError $OG_ERR_FORMAT || return $? + +# Montar la particion, si no lo estaba previamente. +MNTDIR=$(ogMount $1 $2) || return $? + +# Buscar tipo de sistema operativo. +# Para GNU/Linux: leer descripción. +TYPE="Linux" +FILE="$MNTDIR/etc/os-release" +[ -r $FILE ] && VERSION="$(awk -F= '$1~/PRETTY_NAME/ {gsub(/\"/,"",$2); print $2}' $FILE)" +# Si no se puede obtener, buscar en ficheros del sistema. +if [ -z "$VERSION" ]; then + FILE="$MNTDIR/etc/lsb-release" + [ -r $FILE ] && VERSION="$(awk -F= '$1~/DESCRIPTION/ {gsub(/\"/,"",$2); print $2}' $FILE)" + for DISTRIB in redhat SuSE mandrake gentoo; do + FILE="$MNTDIR/etc/${DISTRIB}-release" + [ -r $FILE ] && VERSION="$(head -1 $FILE)" + done + FILE="$MNTDIR/etc/arch-release" + [ -r $FILE ] && VERSION="Arch Linux" + FILE="$MNTDIR/etc/slackware-version" + [ -r $FILE ] && VERSION="Slackware $(cat $FILE)" +fi +# Si no se encuentra, intentar ejecutar "lsb_release". +[ -z "$VERSION" ] && VERSION=$(chroot $MNTDIR lsb_release -d 2>/dev/null | awk -F":\t" '{print $2}') +# Comprobar Linux de 64 bits. +[ -n "$VERSION" ] && [ -e $MNTDIR/lib64 ] && IS64BIT="$MSG_64BIT" +# Para Android, leer fichero de propiedades. +if [ -z "$VERSION" ]; then + TYPE="Android" + FILE="$MNTDIR/android*/system/build.prop" + [ -r $FILE ] && VERSION="Android $(awk -F= '$1~/(product.brand|build.version.release)/ {print $2}' $FILE | tr '\n' ' ')" + [ -e $MNTDIR/lib64 ] && IS64BIT="$MSG_64BIT" +fi +# Para GNU/Hurd, comprobar fichero de inicio (basado en os-prober). +if [ -z "$VERSION" ]; then + TYPE="Hurd" + FILE="$MNTDIR/hurd/init" + [ -r $FILE ] && VERSION="GNU/Hurd" +fi +# Para Windows: leer la version del registro. +if [ -z "$VERSION" ]; then + TYPE="Windows" + FILE="$(ogGetHivePath $MNTDIR SOFTWARE)" + if [ -n "$FILE" ]; then + # Nuevo método más rápido para acceder al registro de Windows.. + VERSION=$(echo $(hivexsh << EOT 2>/dev/null +load $FILE +cd \Microsoft\Windows NT\CurrentVersion +lsval ProductName +lsval ReleaseId +EOT + )) + [ -n "$(reglookup -H -p "Microsoft/Windows/CurrentVersion/ProgramW6432Dir" "$FILE" 2>/dev/null)" ] && IS64BIT="$MSG_64BIT" + if [ -z "$VERSION" ]; then + # Compatibilidad con métrodo antiguo y más lento de acceder al registro. + VERSION=$(ogGetRegistryValue $MNTDIR software '\Microsoft\Windows NT\CurrentVersion\ProductName' 2>/dev/null) + [ -n "$(ogGetRegistryValue $MNTDIR software '\Microsoft\Windows\CurrentVersion\ProgramW6432Dir' 2>/dev/null)" ] && IS64BIT="$MSG_64BIT" + fi + fi +fi +# Para cargador Windows: buscar versión en fichero BCD (basado en os-prober). +if [ -z "$VERSION" ]; then + TYPE="WinLoader" + FILE="$(ogGetPath $MNTDIR/boot/bcd)" + [ -z "$FILE" ] && FILE="$(ogGetPath $MNTDIR/EFI/Microsoft/boot/bcd)" + if [ -n "$FILE" ]; then + for DISTRIB in "Windows Recovery" "Windows Boot"; do + if grep -aqs "$(echo "$DISTRIB" | sed 's/./&./g')" $FILE; then + VERSION="$DISTRIB loader" + fi + done + fi +fi +# Para macOS: detectar kernel y completar con fichero plist de información del sistema. +if [ -z "$VERSION" ]; then + TYPE="MacOS" + # Kernel de Mac OS (no debe ser fichero de texto). + FILE="$MNTDIR/mach_kernel" + if [ -z "$(file -b $FILE | grep 'text')" ]; then + # Obtener tipo de kernel. + [ -n "$(file -b $FILE | grep 'Mach-O')" ] && VERSION="macOS" + [ -n "$(file -b $FILE | grep 'Mach-O 64-bit')" ] && IS64BIT="$MSG_64BIT" + # Datos de configuración de versión de Mac OS. + FILE="$MNTDIR/System/Library/CoreServices/SystemVersion.plist" + [ -r $FILE ] && VERSION=$(awk -F"[<>]" ' + /ProductName/ {getline;s=$3} + /ProductVersion/ {getline;v=$3} + END {print s,v}' $FILE) + # Datos de recuperación de macOS. + FILE="$MNTDIR/com.apple.recovery.boot" + [ -r $FILE -a -n "$VERSION" ] && VERSION="$VERSION recovery" + fi +fi +# Para FreeBSD: obtener datos del Kernel. +### TODO Revisar solución. +if [ -z "$VERSION" ]; then + TYPE="BSD" + FILE="$MNTDIR/boot/kernel/kernel" + if [ -r $FILE ]; then + VERSION="$(strings $FILE|awk '/@.*RELEASE/ {sub(/@\(#\)/,""); print $1,$2}')" + [ -n "$(file -b $FILE | grep 'x86-64')" ] && IS64BIT="$MSG_64BIT" + fi +fi +# Para Solaris: leer el fichero de versión. +### TODO Revisar solución. +if [ -z "$VERSION" ]; then + TYPE="Solaris" + FILE="$MNTDIR/etc/release" + [ -r $FILE ] && VERSION="$(head -1 $FILE)" +fi +# Para cargador GRUB, comprobar fichero de configuración. +if [ -z "$VERSION" ]; then + TYPE="GrubLoader" + for FILE in $MNTDIR/{,boot/}grub/menu.lst; do + [ -r $FILE ] && VERSION="GRUB Loader" + done +#/* (comentario Doxygen) + for FILE in $MNTDIR/{,boot/}{grub{,2},EFI/*}/grub.cfg; do + [ -r $FILE ] && VERSION="GRUB2 Loader" + done +fi +#*/ (Comentario Doxygen) +# Mostrar resultado y salir sin errores. +[ -n "$VERSION" ] && echo "$TYPE:$VERSION $IS64BIT" +return 0 +} \ No newline at end of file -- cgit v1.2.3-18-g5258 From 5868bfe7d45c256c1274bd2d28e66681770619b4 Mon Sep 17 00:00:00 2001 From: adv Date: Thu, 5 Jul 2018 17:23:28 +0200 Subject: #853 Adapting Net.lib library for doxygen --- client/engine/Net.lib | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/engine/Net.lib b/client/engine/Net.lib index 4b3faad9..219d6d46 100755 --- a/client/engine/Net.lib +++ b/client/engine/Net.lib @@ -19,7 +19,8 @@ #@author Irina Gomez, ETSII Universidad de Sevilla #@date 2015-06-16 #*/ -function ogChangeRepo { +function ogChangeRepo () +{ local SRCIMG NEWREPO REPO OGUNIT if [ "$*" == "help" ]; then -- cgit v1.2.3-18-g5258 From 05bbb82455a062a2ebf22d6aaaa62303c58bcae0 Mon Sep 17 00:00:00 2001 From: adv Date: Thu, 5 Jul 2018 17:24:08 +0200 Subject: #853 Adapting PostConf.lib library for doxygen --- client/engine/PostConf.lib | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/engine/PostConf.lib b/client/engine/PostConf.lib index 1f04532f..4e07f5a0 100755 --- a/client/engine/PostConf.lib +++ b/client/engine/PostConf.lib @@ -22,7 +22,8 @@ #@return (nada) #@date 2014-10-27 #*/ ## -function ogCleanOs { +function ogCleanOs () +{ # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then @@ -38,7 +39,7 @@ case "$(ogGetOsType $1 $2)" in Linux) # Borramos los ficheros de dispositivos y los temporales. ogCleanLinuxDevices $1 $2 - rm -rf $(ogMount $1 $2)/tmp/* + rm -rf $(ogMount $1 $2)/tmp/* #*/ Comentario Doxygen ;; Windows) # Borrar ficheros de hibernación y paginación de Windows. @@ -314,6 +315,10 @@ Set objComputer = GetObject("winmgmts:{impersonationLevel=Impersonate}!\\\" & _ ReturnValue = objComputer.JoinDomainOrWorkGroup(strDomain, strPassword, _ strDomain & "\" & strUser, NULL, JOIN_DOMAIN + ACCT_CREATE) EOF + +#*/ " (comentario Doxygen) + + } -- cgit v1.2.3-18-g5258 From 04ddf016257c8d7db83b27f65d398cd8179edd54 Mon Sep 17 00:00:00 2001 From: adv Date: Thu, 5 Jul 2018 17:24:42 +0200 Subject: #853 Adapting Protocol library for doxygen --- client/engine/Protocol.lib | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/client/engine/Protocol.lib b/client/engine/Protocol.lib index 786dba87..ccc24c6d 100755 --- a/client/engine/Protocol.lib +++ b/client/engine/Protocol.lib @@ -781,7 +781,8 @@ fi #@author Irina Gomez, ETSII Universidad de Sevilla #@date 2017/06/23 #*/ ## -function ogMcastRequest { +function ogMcastRequest () +{ # Variables locales local FILE PROTOOPT PORT PORTAUX REPOIP REPOPORTAUX REPEAT OGUNIT @@ -828,9 +829,8 @@ done #@param (2 parámetros) $1 path_aboluto_fichero_torrent $2 Parametros_Session_Torrent #@param (3 parámetros) $1 Contenedor CACHE $2 path_absoluto_fichero_Torrent $3 Parametros_Session_Torrent #@param (4 parámetros) $1 disk $2 particion $3 path_absoluto_fichero_Torrent 4$ Parametros_Session_Torrent - #@return -#@note +#@note protocoloTORRENT=mode:time mode=seeder -> Dejar el equipo seedeando hasta que transcurra el tiempo indicado o un kill desde consola, mode=peer -> seedear mientras descarga mode=leecher -> NO seedear mientras descarga time tiempo que una vez descargada la imagen queremos dejar al cliente como seeder. #@todo: #@version 0.1 - Integración para OpenGNSys. #@author Antonio J. Doblas Viso. Universidad de Málaga @@ -845,13 +845,6 @@ done #@author Antonio J. Doblas Viso. Univesidad de Málaga. #@date #*/ ## - -#protocoloTORRENT mode:time -#mode=seeder -> Dejar el equipo seedeando hasta que transcurra el tiempo indicado o un kill desde consola, -#mode=peer -> seedear mientras descarga -#mode=leecher -> NO seedear mientras descarga -#time tiempo que una vez descargada la imagen queremos dejar al cliente como seeder. - function ogTorrentStart () { -- cgit v1.2.3-18-g5258 From 3e88cf15f4712887ddab71176a146759d73767b9 Mon Sep 17 00:00:00 2001 From: adv Date: Thu, 5 Jul 2018 17:25:44 +0200 Subject: #853 Adapting Rsync.lib library for doxygen --- client/engine/Rsync.lib | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/engine/Rsync.lib b/client/engine/Rsync.lib index d123232a..83140419 100755 --- a/client/engine/Rsync.lib +++ b/client/engine/Rsync.lib @@ -384,7 +384,6 @@ fi } -function ogSyncCreate () { #/** # ogSyncCreate #@brief sincroniza los datos de la partición a la imagen para crearla. La imagen esta montada en un directorio. @@ -394,6 +393,7 @@ function ogSyncCreate () { #@param 4 Nombre Imagen #@param 5 Tipo imagen [ img | diff ] #*/ +function ogSyncCreate () { local ORIG DIRAUX DIRMOUNT DESTRSYNC USERRSYNC PASSWORD OPTRSYNC RETVAL # Limpiamos los archivo de log @@ -525,7 +525,7 @@ echo " rsync -aHAX$OPTRSYNC --progress $FILESFROM $ORIG/ $DESTRSYNC" rsync -aHAX$OPTRSYNC $PASSWORD --progress $FILESFROM "$ORIG/" "$DESTRSYNC" 2>$OGLOGCOMMAND | egrep "^deleting|^sent|^sending|^total|%" |tee -a $OGLOGCOMMAND RETVAL=${PIPESTATUS[0]} cd / -return $RETVAL +#*/ " Comentario Doxygen } -- cgit v1.2.3-18-g5258 From a58595a2510d05630d9282f915759ad272122ee8 Mon Sep 17 00:00:00 2001 From: adv Date: Thu, 5 Jul 2018 17:26:12 +0200 Subject: #853 Adapting String.lib library for doxygen --- client/engine/String.lib | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/engine/String.lib b/client/engine/String.lib index 3c4430e6..5774fe7a 100755 --- a/client/engine/String.lib +++ b/client/engine/String.lib @@ -14,7 +14,7 @@ #@author Antonio Doblas Viso, Universidad de Málaga #@date 2010/05/09 #*/ ## -#/** + function ogCheckStringInGroup () { local i @@ -54,8 +54,6 @@ return 1 #@author Antonio Doblas Viso, Universidad de Málaga #@date 2010/05/09 #*/ ## -#/** - function ogCheckStringInReg() { @@ -91,7 +89,7 @@ REG=$2 #@author Antonio Doblas Viso, Universidad de Málaga #@date 2010/05/09 #*/ ## -#/** + function ogCheckIpAddress() { local REG IP arrIP -- cgit v1.2.3-18-g5258 From 65dd71b8035f8cf6e3b3ea1fa7cff838c21d43d2 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Mon, 9 Jul 2018 13:51:46 +0200 Subject: #847: Correcting errata when obtaining revision date (commit SHA1 is not verified); updating change log. --- client/boot-tools/boottoolsfunctions.lib | 2 +- doc/CHANGELOG.es.txt | 8 ++++++-- installer/vagrant/Vagrantfile-boottools-vbox | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/client/boot-tools/boottoolsfunctions.lib b/client/boot-tools/boottoolsfunctions.lib index c615a9fb..0624921d 100755 --- a/client/boot-tools/boottoolsfunctions.lib +++ b/client/boot-tools/boottoolsfunctions.lib @@ -142,7 +142,7 @@ case "${1,,}" in ;; esac SVNURL="https://github.com/opengnsys/OpenGnsys/branches/devel/client" -VERSIONSVN=$(LC_ALL=C svn info $SVNURL | awk '/Date:/ {gsub(/-/,""); print ""$4}' +VERSIONSVN=$(LC_ALL=C svn info $SVNURL | awk '/Date:/ {gsub(/-/,""); print ""$4}') NAMEISOCLIENT="$VERSIONBOOTTOOLS-$OSCODENAME-$OSRELEASE-$OSARCH-$VERSIONSVN" NAMEHOSTCLIENT="$VERSIONBOOTTOOLS-$OSCODENAME-$VERSIONSVN" export OSDISTRIB OSCODENAME OSRELEASE OSARCH OSHTTP diff --git a/doc/CHANGELOG.es.txt b/doc/CHANGELOG.es.txt index 9838335b..db9d9db3 100644 --- a/doc/CHANGELOG.es.txt +++ b/doc/CHANGELOG.es.txt @@ -3,11 +3,15 @@ LISTA DE CAMBIOS CHANGELOG.es.txt -Lista de cambios incluidos en OpenGnsys 1.1.1 Espeto ----------------------------------------------------- +Lista de cambios incluidos en OpenGnsys 1.1.1 (Espeto) +------------------------------------------------------ + +Tickets resueltos en módulo OpenGnsys Client +#852 Apagado del cliente si tiempo de espera cambia de día Tickets resueltos en módulo OpenGnsys Web Admin Console: #772 Módulo de administración web para dispositivos smartphones y tablets (no se resolverá) +#804 Conversión de todo el código php de la consola web de administración a Php7 y Mysqli (tarea) #816 Marcar ordenador de profesor #824 Iniciar sistema restaurado (no integrado) #835 Problemas al listar plantillas en Nerboot Avanzado diff --git a/installer/vagrant/Vagrantfile-boottools-vbox b/installer/vagrant/Vagrantfile-boottools-vbox index 83348f02..0c1f081b 100644 --- a/installer/vagrant/Vagrantfile-boottools-vbox +++ b/installer/vagrant/Vagrantfile-boottools-vbox @@ -19,7 +19,7 @@ sed -i "s/XKBLAYOUT=.*/XKBLAYOUT=\"${LANG%_*}\"/" /etc/default/keyboard dpkg-reconfigure -fnoninteractive console-setup # Install dependencies. apt-get update -y -apt-get install -y subversion +apt-get install -y subversion syslinux syslinux-efi syslinux-utils # Prepare environment. groupadd opengnsys mkdir -p /opt/opengnsys/client /tmp/opengnsys_installer/opengnsys -- cgit v1.2.3-18-g5258 From 2ed5bb7b2131716e62af62948f54077ca4fb310f Mon Sep 17 00:00:00 2001 From: Fredy Date: Tue, 10 Jul 2018 13:31:35 +0200 Subject: #858 Starting filling the blank :-) --- admin/WebConsole/nada.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/admin/WebConsole/nada.php b/admin/WebConsole/nada.php index 84e7b490..9e0aa255 100644 --- a/admin/WebConsole/nada.php +++ b/admin/WebConsole/nada.php @@ -218,7 +218,22 @@ if (empty($data->project)) { + + + + + + + + + + + + +"Here we will show our content" + + -- cgit v1.2.3-18-g5258 From 38fb4a88d80d1ccb3c26530daf54f81e31b42d91 Mon Sep 17 00:00:00 2001 From: adv Date: Wed, 11 Jul 2018 12:52:09 +0200 Subject: #859 El server siempre es servidor PXE. IP y OGLIVE=server --- server/bin/setclientmode | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/server/bin/setclientmode b/server/bin/setclientmode index 53ccf26e..1ca39691 100755 --- a/server/bin/setclientmode +++ b/server/bin/setclientmode @@ -19,6 +19,9 @@ #@version 1.1.0 - Se incluye la unidad organizativa como parametro del kernel: ogunit=directorio_unidad (ticket #678). #@author Irina Gomez, ETSII Universidad de Sevilla #@date 2015-12-16 +#@version 1.1.1 - El server siempre es el servidor PXE. El segundo parámetro de la IP es el SERVER. La asignación del ogLive siempre es el server. (ticket #859). +#@author Antonio J. Doblas Viso, Universidad de Malaga +#@date 2018-07-11 #*/ ## @@ -94,12 +97,12 @@ for MAC in $ETHERNET; do DATOS=$(mysql --defaults-extra-file=$MYCNF -D "$CATALOG" -s -N -e \ "SELECT ' LANG=$LANG', ' ip=', CONCAT_WS(':', ordenadores.ip, - (@repoip:=repositorios.ip), aulas.router, aulas.netmask, + (SELECT (@serverip:=ipserveradm) FROM entornos LIMIT 1), aulas.router, aulas.netmask, ordenadores.nombreordenador, ordenadores.netiface, 'none'), ' group=', REPLACE(TRIM(aulas.nombreaula), ' ', '_'), - ' ogrepo=', @repoip, - ' oglive=', @repoip, - ' oglog=', (SELECT (@serverip:=ipserveradm) FROM entornos LIMIT 1), + ' ogrepo=', (@repoip:=repositorios.ip), + ' oglive=', @serverip, + ' oglog=', @serverip, ' ogshare=', @serverip, ' oglivedir=', ordenadores.oglivedir, IF(perfileshard.descripcion<>'', CONCAT(' hardprofile=', REPLACE(TRIM(perfileshard.descripcion), ' ', '_')), ''), -- cgit v1.2.3-18-g5258 From c255425638e2a640ff33271e9327f1f3f4a17a2e Mon Sep 17 00:00:00 2001 From: adv Date: Sun, 15 Jul 2018 21:06:27 +0200 Subject: #863 smartPartition ejemplo para establecer tablas de particionado multiples según agrupamiento de tamaños de disco MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/shared/scripts/samples/smartPartition | 62 ++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 client/shared/scripts/samples/smartPartition diff --git a/client/shared/scripts/samples/smartPartition b/client/shared/scripts/samples/smartPartition new file mode 100644 index 00000000..568ed322 --- /dev/null +++ b/client/shared/scripts/samples/smartPartition @@ -0,0 +1,62 @@ +#!/bin/bash +#/** +# smartPartition.template +#@brief particiona los clientes del laboratorio virtual. +#@param 1 +#@ejemplo: +#@return: Scripts de ejemplo para establecer particionado según tamaño. +#@exception OG_ERR_ NOTFOUND Disco duro no encontrador. +#@note +#@todo: +#@version 0.1 primera version +#@author adv +#@date 2018/07/08 + +#Calculamos el numero de discos +NDISK=$(ogDiskToDev | wc -w) + +#Si no hay discos, error +[ -z $NDISK ] && exit $(ogRaiseError $OG_ERR_NOTFOUND "ogDiskToDev | wc -w") + +#asignamos contador al primer disco de OpenGnsys +COUNTER=1 +until [ $COUNTER -gt $NDISK ]; do + ogUnmountAll $COUNTER + ogDeletePartitionTable $COUNTER + ogCreatePartitionTable $COUNTER MSDOS + ogUpdatePartitionTable $COUNTER + let COUNTER=COUNTER+1 +done + +#Establecemos las Particiones CACHE con tamaños diferentes según la capacidad del disco. +#Si el PC tiene dos discos duros, el segundo será completo para la CACHE. +#establecemos rangos de las capacidades con expresiones regulares: https://goo.gl/gJnK7g +case $NDISK in + 1) + #Calcular el tamaño máximo del disco duro redondeando a la baja en 500 MB para evitar problemas de calculo" + SIZE_DISK1=$(expr $(ogGetDiskSize 1) - 500000) + #entre 70 y 73'9GB + ogCheckStringInReg $SIZE_DISK1 "^7[0-3][0-9]{6}$" && initCache 1 4 32000000 NOMOUNT + #entre 50 y 52'9 + ogCheckStringInReg $SIZE_DISK1 "^5[0-2][0-9]{6}$" && initCache 1 4 12000000 NOMOUNT + ;; + 2) + #Calcular el tamaño máximo del disco duro redondeando a la baja en 500 MB para evitar problemas de calculo" + SIZE_DISK2=$(expr $(ogGetDiskSize 1) - 500000) + initCache 2 4 $SIZE_DISK2 NOMOUNT + ;; +esac + +#El particionado para los sistemas operativos identicos para todos. +#Requiere tener una tabla de particiones previa. +ogCreatePartitions 1 NTFS:19000000 LINUX:19000000 EMPTY:0; + +#asignamos contador al primer disco de OpenGnsys +COUNTER=1 +until [ $COUNTER -gt $NDISK ]; do + ogBootMbrGeneric $COUNTER + ogSetPartitionActive 1 $COUNTER + ogListPartitions $COUNTER + ogGetPartitionActive $COUNTER + let COUNTER=COUNTER+1 +done -- cgit v1.2.3-18-g5258 From 77579c4bcb74f415d1487daf16c98b58ef15e632 Mon Sep 17 00:00:00 2001 From: adv Date: Wed, 18 Jul 2018 17:43:34 +0200 Subject: #864 firstRunOnceWindows ejemplo de scripts para miniSetup sin raton ni teclado. --- client/shared/scripts/samples/firstRunOnceWindows | 68 +++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 client/shared/scripts/samples/firstRunOnceWindows diff --git a/client/shared/scripts/samples/firstRunOnceWindows b/client/shared/scripts/samples/firstRunOnceWindows new file mode 100644 index 00000000..00a6e071 --- /dev/null +++ b/client/shared/scripts/samples/firstRunOnceWindows @@ -0,0 +1,68 @@ +#!/bin/bash +#/** +#@file FirstRunOnceWindows +#@brief Guión de rutinas que se ejecutarán en los windows con teclado y raton desactivados. +#@param $1 número de disco +#@param $2 número de particion +#@exception OG_ERR_FORMAT 1 formato incorrecto. +#@exception OG_ERR_NOTFOUND 2 fichero de imagen o partición no detectados. +#@exception OG_ERR_PARTITION 3 # Error en partición de disco. +#@exception OG_ERR_LOCKED 4 partición bloqueada por otra operación. +#@version 1.0.1 - primera version: desactivar/activar ratón y teclado +#@author Antonio J. Doblas Viso. +#@date 2017-02-23 +#**/ + + + +PROG="$(basename $0)" +if [ $# -lt 2 ]; then + ogRaiseError session $OG_ERR_FORMAT "$MSG_FORMAT: $PROG ndisco nparticion" + exit $? +fi + + +# Asignación de variables +## Bloque de variables de parámetros +DISK=$1 +PART=$2 +POSTCONF=postconf.cmd +### Bloque de variables basada en un archivo de claves: ADMIN PASSADMIN USER PASSUSER +source $OGETC/os.cfg $DISK $PART + + + +OSVERSION=$(ogGetOsVersion $1 $2) +case "$OSVERSION" in + *Windows*) + # Desactivamos el telcado y el ratón + ogSetRegistryValue $(ogMount $DISK $PART) SYSTEM '\ControlSet001\Services\kbdclass\Start' 4 + ogSetRegistryValue $(ogMount $DISK $PART) SYSTEM '\ControlSet001\Services\mouclass\Start' 4 + + ## Indicación del proceso (variable $POSTCONF), usuario que lo ejecutará ($ADMIN) y configuración del windows para que arranque con autologin tras la postconfiguración (1 "$USER" "$PASSUSER") + echo "ogInstallMiniSetup $DISK $PART $POSTCONF $ADMIN $PASSADMIN 1 \"$USER\" \"$PASSUSER\" " + ogInstallMiniSetup $DISK $PART $POSTCONF $ADMIN $PASSADMIN 1 "$USER" "$PASSUSER" + ogAddCmd $DISK $PART $POSTCONF '@echo off' + ogAddCmd $DISK $PART $POSTCONF 'start "C:\Program Files\Internet Explorer\iexplore.exe" wwww.opengnsys.es' + ogAddCmd $DISK $PART $POSTCONF "timeout /t 200 /NOBREAK" + ogAddCmd $DISK $PART $POSTCONF "shutdown -r -t 300" + ogAddCmd $DISK $PART $POSTCONF 'start winword.exe' + ogAddCmd $DISK $PART $POSTCONF 'taskkill /F /IM winword.exe' + ogAddCmd $DISK $PART $POSTCONF 'REG ADD HKLM\SYSTEM\CurrentControlSet\Services\kbdclass\ /v Start /t REG_DWORD /d 3 /f' + ogAddCmd $DISK $PART $POSTCONF 'REG ADD HKLM\SYSTEM\CurrentControlSet\Services\mouclass\ /v Start /t REG_DWORD /d 3 /f' + ogAddCmd $DISK $PART $POSTCONF 'REG ADD HKLM\SYSTEM\ControlSet001\Services\kbdclass\ /v Start /t REG_DWORD /d 3 /f' + ogAddCmd $DISK $PART $POSTCONF 'REG ADD HKLM\SYSTEM\ControlSet001\Services\mouclass\ /v Start /t REG_DWORD /d 3 /f' + #ogAddCmd $DISK $PART $POSTCONF '"c:\Program Files\Toolwiz Time Freeze 2017\ToolwizTimeFreeze.exe" /freezealways /usepass=' + #ogAddCmd $DISK $PART $POSTCONF 'reg query "HKCU\SOFTWARE\Toolwiz\TimefreezeNew"' + + #ogAddCmd $DISK $PART $POSTCONF "cscript \"c:\Archivo de Programas (x86)\agua\aguac\scripts\MSOfficeActivate.vbs\" " + #ogAddCmd $DISK $PART $POSTCONF "del \"c:\Program Files (x86)\agua\aguac\scripts\MSWinActivate.vbs\" " + #unix2dos /mnt/sda1/Windows/System32/postconf.cmd + + ### reiniciamos el equipo + ogAddCmd $DISK $PART $POSTCONF "shutdown -r" + ### consultamos + cat $(ogMount $DISK $PART)/Windows/System32/$POSTCONF + + ;; +esac -- cgit v1.2.3-18-g5258 From dd52405070e45eee04988a384c7d97941d60c030 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Thu, 26 Jul 2018 09:58:08 +0000 Subject: #866 engine.cfg: Si al restaurar usando la cache no hay espacio en la misma se finalizará la acción. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/shared/etc/engine.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/shared/etc/engine.cfg b/client/shared/etc/engine.cfg index 7bb74d48..fd5ecd90 100644 --- a/client/shared/etc/engine.cfg +++ b/client/shared/etc/engine.cfg @@ -12,7 +12,7 @@ OGWINCHKDISK=TRUE #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=UNICAST +RESTOREPROTOCOLNOTCACHE=NONE #script Creacion imagen IMGPROG="partclone" -- cgit v1.2.3-18-g5258 From 2a0c332424296d966dfc5431c5e3fd9a0aab1995 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Thu, 2 Aug 2018 09:32:37 +0000 Subject: #867 La ayuda incluye información de las funciones, engine.cfg, changelog, etc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/WebConsole/barramenu.php | 11 +------ admin/WebConsole/estilos.css | 6 +++- admin/WebConsole/idiomas/php/cat/barramenu_cat.php | 4 --- admin/WebConsole/idiomas/php/eng/barramenu_eng.php | 1 - admin/WebConsole/idiomas/php/esp/barramenu_esp.php | 1 - admin/WebConsole/principal/acercade.php | 16 ---------- admin/WebConsole/principal/ayuda.php | 37 ++++++++++++++++++++++ admin/WebConsole/principal/changelog.php | 36 +++++++++++++++++++++ admin/WebConsole/principal/engine.php | 32 +++++++++++++++++++ 9 files changed, 111 insertions(+), 33 deletions(-) create mode 100644 admin/WebConsole/principal/ayuda.php create mode 100644 admin/WebConsole/principal/changelog.php create mode 100644 admin/WebConsole/principal/engine.php diff --git a/admin/WebConsole/barramenu.php b/admin/WebConsole/barramenu.php index dfb618ed..7584c0d3 100644 --- a/admin/WebConsole/barramenu.php +++ b/admin/WebConsole/barramenu.php @@ -60,7 +60,7 @@ if (!$cmd) var href2="nada.php"; var href3="./api/tree.html"; var href4="./api/main.html"; - var href5="./api/index.html"; + var href5="./principal/ayuda.php"; var device=""; var version=""; @@ -160,9 +160,6 @@ if (!$cmd) case 22: opadre.frames["frame_contenidos"].document.location.href=href5; break; - case 23: - opadre.frames["frame_contenidos"].document.location.href="./principal/acercade.php"; - break; } } } @@ -234,12 +231,6 @@ if (!$cmd)     - - -     - - -     diff --git a/admin/WebConsole/estilos.css b/admin/WebConsole/estilos.css index 4b37be1f..302d0f6a 100644 --- a/admin/WebConsole/estilos.css +++ b/admin/WebConsole/estilos.css @@ -431,4 +431,8 @@ A.tabla_listados_sin:link{ FONT-SIZE: 14px; FONT-WEIGHT: 300; } - +/* Ayuda enlaces sin subrayado */ +a.nounderline:link +{ +text-decoration:none; +} diff --git a/admin/WebConsole/idiomas/php/cat/barramenu_cat.php b/admin/WebConsole/idiomas/php/cat/barramenu_cat.php index 338ebb32..27c54de3 100644 --- a/admin/WebConsole/idiomas/php/cat/barramenu_cat.php +++ b/admin/WebConsole/idiomas/php/cat/barramenu_cat.php @@ -21,7 +21,3 @@ $TbMsg[14]='Cercar'; $TbMsg[15]='Netboot Avançat'; $TbMsg[16]='Unitat Organitzativa'; - $TbMsg[17]='Acerca de'; - -?> - diff --git a/admin/WebConsole/idiomas/php/eng/barramenu_eng.php b/admin/WebConsole/idiomas/php/eng/barramenu_eng.php index 66fb6173..faf0d422 100644 --- a/admin/WebConsole/idiomas/php/eng/barramenu_eng.php +++ b/admin/WebConsole/idiomas/php/eng/barramenu_eng.php @@ -21,4 +21,3 @@ $TbMsg[14]='Search'; $TbMsg[15]='Advanced Netboot'; $TbMsg[16]='Organizational Unit'; - $TbMsg[17]='About'; diff --git a/admin/WebConsole/idiomas/php/esp/barramenu_esp.php b/admin/WebConsole/idiomas/php/esp/barramenu_esp.php index 1ea51290..6d863015 100644 --- a/admin/WebConsole/idiomas/php/esp/barramenu_esp.php +++ b/admin/WebConsole/idiomas/php/esp/barramenu_esp.php @@ -21,6 +21,5 @@ $TbMsg[14]='Buscar'; $TbMsg[15]='Netboot Avanzado'; $TbMsg[16]='Unidad Organizativa'; - $TbMsg[17]='Acerca de'; ?> diff --git a/admin/WebConsole/principal/acercade.php b/admin/WebConsole/principal/acercade.php index f95e07c1..30a8e90b 100644 --- a/admin/WebConsole/principal/acercade.php +++ b/admin/WebConsole/principal/acercade.php @@ -131,21 +131,5 @@ fclose($crearficheroinicio);

GPL v3

-

".$TbMsg["CHANGE"]."" - .@$data->project.' '.@$data->version.' '.(isset($data->codename)?'('.$data->codename.')':''); - } -?>

- -

".$TbMsg["MANUAL"]."";?>

- -

opengnsys.es

- - - - - diff --git a/admin/WebConsole/principal/ayuda.php b/admin/WebConsole/principal/ayuda.php new file mode 100644 index 00000000..ef4f0fdc --- /dev/null +++ b/admin/WebConsole/principal/ayuda.php @@ -0,0 +1,37 @@ + + + + + Administración web de aulas + + + + + + +

  

+
+ +
+

+

+

+

 

+

+

+

+

+
+ + diff --git a/admin/WebConsole/principal/changelog.php b/admin/WebConsole/principal/changelog.php new file mode 100644 index 00000000..643a063d --- /dev/null +++ b/admin/WebConsole/principal/changelog.php @@ -0,0 +1,36 @@ + + + + + Administración web de aulas + + + + + + +

  
+

+
+ +
+
+        
+        
+        
+ + + diff --git a/admin/WebConsole/principal/engine.php b/admin/WebConsole/principal/engine.php new file mode 100644 index 00000000..cbec7664 --- /dev/null +++ b/admin/WebConsole/principal/engine.php @@ -0,0 +1,32 @@ + + + + + Administración web de aulas + + + + + + +

  
+

+
+ +
+
+        
+        
+        
+ + + -- cgit v1.2.3-18-g5258 From 046004d9329b96336895db3572f9b26651d74a55 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Tue, 14 Aug 2018 11:02:41 +0000 Subject: #868 configureOs: Se resuelve errata por la que no se desintala el agente de Windows antiguo. --- client/shared/scripts/configureOs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/shared/scripts/configureOs b/client/shared/scripts/configureOs index a19bf4ed..4b7ec6f7 100755 --- a/client/shared/scripts/configureOs +++ b/client/shared/scripts/configureOs @@ -73,13 +73,13 @@ case "$OSTYPE" in ogWindowsBootParameters $1 $2 # Registrar en Windows que la partición indicada es su nueva unidad C:\ ogWindowsRegisterPartition $1 $2 C $1 $2 + # Configurar nuevo agente OGAgent. + ogConfigureOgagent $1 $2 # Eliminar el antiguo cliente de Windows. if [ -n "$(ogGetPath $MNTDIR/windows/ogAdmWinClient.exe)$(ogGetPath $MNTDIR/winnt/ogAdmWinClient.exe)" ]; then ogInstallMiniSetup $1 $2 postconf.cmd ogUninstallWindowsClient $1 $2 postconf.cmd fi - # Configurar nuevo agente OGAgent. - ogConfigureOgagent $1 $2 ;; Linux) # Postconfiguración de GNU/Linux. ## Instala (no configura) el codigo de arranque del Grub en la partición (no lo configura, se mantiene el original de la imagen) -- cgit v1.2.3-18-g5258 From 9e64d82477d5852a184649dcd038e5af1333913d Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Wed, 22 Aug 2018 10:12:29 +0200 Subject: #869: Adaptación de paquetes en Ubuntu 18.04 y evitar redundancias al detectar parámetros de red. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- installer/opengnsys_installer.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index c5375050..ccd4de0e 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -306,6 +306,8 @@ case "$OSDISTRIB" in fi # Adaptar dependencias para libmysqlclient. [ -z "$(apt-cache pkgnames libmysqlclient-dev)" ] && [ -n "$(apt-cache pkgnames libmysqlclient15)" ] && DEPENDENCIES=( ${DEPENDENCIES[@]//libmysqlclient-dev/libmysqlclient15} ) + # Paquete correcto para realpath. + [ -z "$(apt-cache pkgnames realpath)" ] && DEPENDENCIES=( ${DEPENDENCIES[@]//realpath/coreutils} ) ;; centos) # Postconfiguación personalizada para CentOS. # Configuración para PHP 7. @@ -876,8 +878,8 @@ function getNetworkSettings() if [ -n "${SERVERIP[i]}" ]; then NETMASK[i]=$( cidr2mask $(ip -o addr show dev "$dev" | awk '$3~/inet$/ {sub (/.*\//, "", $4); print ($4)}') ) NETBROAD[i]=$(ip -o addr show dev "$dev" | awk '$3~/inet$/ {print ($6)}') - NETIP[i]=$(ip route | awk -v d="$dev" '$3==d && /src/ {sub (/\/.*/,""); print $1}') - ROUTERIP[i]=$(ip route | awk -v d="$dev" '$1=="default" && $5==d {print $3}') + NETIP[i]=$(ip route list proto kernel | awk -v d="$dev" '$3==d && /src/ {sub (/\/.*/,""); print $1}') + ROUTERIP[i]=$(ip route list default | awk -v d="$dev" '$5==d {print $3}') DEFAULTDEV=${DEFAULTDEV:-"$dev"} fi let i++ -- cgit v1.2.3-18-g5258 From 83d87a3903ddb91b682e176644988d4e65b7ec8e Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Mon, 27 Aug 2018 10:08:18 +0200 Subject: Close #840 #847: Cliente ogLive se gneera a partir del código Git en vez de Subversion; lista actualizada de tickets resultos. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/boot-tools/boottoolsfunctions.lib | 27 +++++++++------------- client/boot-tools/boottoolsgenerator.sh | 4 ++-- .../etc/initramfs-tools/scripts/VERSION.txt | 2 +- .../etc/initramfs-tools/scripts/ogfunctions | 2 +- .../usr/bin/boot-tools/boottoolsFsOpengnsys.sh | 6 ++--- .../usr/bin/boot-tools/boottoolsInitrdGenerate.sh | 2 +- .../usr/bin/boot-tools/boottoolsSoftwareInstall.sh | 4 ++-- doc/CHANGELOG.es.txt | 9 +++++++- installer/vagrant/Vagrantfile-boottools-vbox | 2 +- 9 files changed, 30 insertions(+), 28 deletions(-) diff --git a/client/boot-tools/boottoolsfunctions.lib b/client/boot-tools/boottoolsfunctions.lib index 0624921d..15478248 100755 --- a/client/boot-tools/boottoolsfunctions.lib +++ b/client/boot-tools/boottoolsfunctions.lib @@ -4,7 +4,7 @@ #@brief Librería o clase Boot-Tools #@class Boot-Tools #@brief Funciones para generar un sistema operativo cliente para opengnsys -#@version 1.1.0 +#@version 1.1.1 #@warning License: GNU GPLv3+ #*/ @@ -13,13 +13,7 @@ # Autor: Antonio J. Doblas Viso. Universidad de Málaga. function btogGetVar() { - -export BTSVNBOOTTOOLS=/tmp/opengnsys_installer/opengnsys/client/boot-tools -export BTSVNSHARE=/tmp/opengnsys_installer/opengnsys/client/shared -export BTSVNENGINE=/tmp/opengnsys_installer/opengnsys/client/engine - -export BTSVNOG2=/tmp/opengnsys_installer/opengnsys2 - +export BTDIR=/tmp/opengnsys_installer/opengnsys/client/boot-tools export BTTARGETDIR=/var/lib/tftpboot/ogclient/ export BTROOTFSIMG=${BTTARGETDIR}ogclient.img export BTROOTFSMNT=${BTTARGETDIR}ogclientmount @@ -125,7 +119,7 @@ case "${1,,}" in bionic) # ogLive 1.1.1-rc1 basado en Ubuntu 18.04 y Kernel 4.15. OSDISTRIB="ubuntu" OSCODENAME="bionic" - OSRELEASE="4.15.0-13-generic" + OSRELEASE="4.15.0-32-generic" OSARCH="amd64" OSHTTP="http://es.archive.ubuntu.com/ubuntu/" ;; @@ -141,12 +135,13 @@ case "${1,,}" in exit 1 ;; esac -SVNURL="https://github.com/opengnsys/OpenGnsys/branches/devel/client" -VERSIONSVN=$(LC_ALL=C svn info $SVNURL | awk '/Date:/ {gsub(/-/,""); print ""$4}') -NAMEISOCLIENT="$VERSIONBOOTTOOLS-$OSCODENAME-$OSRELEASE-$OSARCH-$VERSIONSVN" -NAMEHOSTCLIENT="$VERSIONBOOTTOOLS-$OSCODENAME-$VERSIONSVN" +BRANCH="devel" +GITURL="https://api.github.com/repos/opengnsys/OpenGnsys/commits?sha=$BRANCH&path=/client" +GITRELEASE=$(curl -s "$GITURL" | jq -r '"r" + (.[0].commit.committer.date | gsub("-"; "")[:8]) + "." + (.[0].sha[:7])') +NAMEISOCLIENT="$VERSIONBOOTTOOLS-$OSCODENAME-$OSRELEASE-$OSARCH-$GITRELEASE" +NAMEHOSTCLIENT="$VERSIONBOOTTOOLS-$OSCODENAME-$GITRELEASE" export OSDISTRIB OSCODENAME OSRELEASE OSARCH OSHTTP -export TYPECLIENT VERSIONSVN NAMEISOCLIENT NAMEHOSTCLIENT +export TYPECLIENT GITRELEASE NAMEISOCLIENT NAMEHOSTCLIENT ### El fichero de configuración debe sustituir a estos 3 ficheros (borrar las 3 líneas siguientes). echo "$NAMEISOCLIENT" > /tmp/opengnsys_info_rootfs echo "$NAMEHOSTCLIENT" > /tmp/opengnsys_chroot @@ -158,7 +153,7 @@ OSCODENAME="$OSCODENAME" OSRELEASE="$OSRELEASE" OSARCH="$OSARCH" OSHTTP="$OSHTTP" -VERSIONSVN="$VERSIONSVN" +GITRELEASE="$GITRELEASE" NAMEISOCLIENT="$NAMEISOCLIENT" NAMEHOSTCLIENT="$NAMEHOSTCLIENT" EOT @@ -364,7 +359,7 @@ TIMEMOD=`date +%Y%m%d-%H%M%S` #copiando cp /tmp/initrd.img-${OSRELEASE} ${BTTARGETDIR}/oginitrd.img -cp /tmp/vmlinuz-${OSRELEASE}.efi.signed ${BTTARGETDIR}/ogvmlinuz +cp /tmp/vmlinuz-${OSRELEASE} ${BTTARGETDIR}/ogvmlinuz #generamos md5 del kernel y del initrd. DATASUM=`md5sum "${BTTARGETDIR}/oginitrd.img" | cut -f1 -d" "` echo $DATASUM > ${BTTARGETDIR}/oginitrd.img.sum diff --git a/client/boot-tools/boottoolsgenerator.sh b/client/boot-tools/boottoolsgenerator.sh index 8983f0ee..fb749a7b 100755 --- a/client/boot-tools/boottoolsgenerator.sh +++ b/client/boot-tools/boottoolsgenerator.sh @@ -72,10 +72,10 @@ echo "FASE 4 - Configurar acceso schroot al Segundo Sistema de archivos (img)" cat /etc/schroot/schroot.conf | grep $BTROOTFSIMG || btogSetFsAccess ########################################################################### echo "FASE 5 - Incorporando ficheros OpenGnsys al sistema raíz rootfs " -cp -a ${BTSVNBOOTTOOLS}/includes/usr/bin/* /tmp +cp -a ${BTDIR}/includes/usr/bin/* /tmp chmod +x /tmp/boot-tools/*.sh # Incluir revisión. -sed -i "1 s/$/ $VERSIONSVN/" ${BTSVNBOOTTOOLS}/includes/etc/initramfs-tools/scripts/VERSION.txt +sed -i "1 s/$/ $GITRELEASE/" ${BTDIR}/includes/etc/initramfs-tools/scripts/VERSION.txt # En Ubuntu 13.04+ es necesario matar proceso de "udev" antes de desmontar. umount $BTROOTFSMNT 2>/dev/null || (kill -9 $(lsof -t $BTROOTFSMNT); umount $BTROOTFSMNT 2>/dev/null) schroot -p -c IMGogclient -- /tmp/boot-tools/boottoolsFsOpengnsys.sh diff --git a/client/boot-tools/includes/etc/initramfs-tools/scripts/VERSION.txt b/client/boot-tools/includes/etc/initramfs-tools/scripts/VERSION.txt index 2878503d..45805bd6 100644 --- a/client/boot-tools/includes/etc/initramfs-tools/scripts/VERSION.txt +++ b/client/boot-tools/includes/etc/initramfs-tools/scripts/VERSION.txt @@ -1 +1 @@ -OpenGnsys Client 1.1.1-rc1-efi +OpenGnsys Client 1.1.1-rc2 diff --git a/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions b/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions index f7d712d9..62f0524a 100644 --- a/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions +++ b/client/boot-tools/includes/etc/initramfs-tools/scripts/ogfunctions @@ -550,7 +550,7 @@ then for i in bin sbin lib $LIBS etc var usr root boot; do ogUnionLiveDir $i done - cat /tmp/mtab.preunion > /etc/mtab + [ -L /etc/mtab ] || cat /tmp/mtab.preunion > /etc/mtab else echo "Fichero imagen del cliente no encontrado" return 1 diff --git a/client/boot-tools/includes/usr/bin/boot-tools/boottoolsFsOpengnsys.sh b/client/boot-tools/includes/usr/bin/boot-tools/boottoolsFsOpengnsys.sh index 0e42a7ed..85b00b69 100755 --- a/client/boot-tools/includes/usr/bin/boot-tools/boottoolsFsOpengnsys.sh +++ b/client/boot-tools/includes/usr/bin/boot-tools/boottoolsFsOpengnsys.sh @@ -24,7 +24,7 @@ echo "$OSDISTRIB:$OSCODENAME:$OSRELEASE:$OSARCH:$OSHTTP" LERROR=TRUE -echo "$FUNCNAME: Iniciando la personalización con datos del SVN " +echo "$FUNCNAME: Iniciando la personalización con datos del repositorio" # parseamos el apt.source de la distribución (en minúsculas) sed -e "s/OSCODENAME/$OSCODENAME/g" ${SVNCLIENTDIR}/includes/etc/apt/sources.list.${OSDISTRIB,,} > ${SVNCLIENTDIR}/includes/etc/apt/sources.list @@ -77,8 +77,8 @@ if [ $? -ne 0 ]; then fi # El fichero de configuración debe sustituir a los 2 ficheros (borrar las 2 líneas). -echo "${VERSIONBOOTTOOLS}-${OSCODENAME}-${OSRELEASE}-${VERSIONSVN}" > /$NAMEISOCLIENTFILE -echo "${VERSIONBOOTTOOLS}-${OSCODENAME}-${VERSIONSVN}" > $NAMEHOSTCLIENTFILE +echo "${VERSIONBOOTTOOLS}-${OSCODENAME}-${OSRELEASE}-${GITRELEASE}" > /$NAMEISOCLIENTFILE +echo "${VERSIONBOOTTOOLS}-${OSCODENAME}-${GITRELEASE}" > $NAMEHOSTCLIENTFILE history -c diff --git a/client/boot-tools/includes/usr/bin/boot-tools/boottoolsInitrdGenerate.sh b/client/boot-tools/includes/usr/bin/boot-tools/boottoolsInitrdGenerate.sh index 9ead10a3..714fba5d 100755 --- a/client/boot-tools/includes/usr/bin/boot-tools/boottoolsInitrdGenerate.sh +++ b/client/boot-tools/includes/usr/bin/boot-tools/boottoolsInitrdGenerate.sh @@ -8,7 +8,7 @@ rm -f /usr/lib/initramfs-tools/bin/* cp /bin/busybox /usr/lib/initramfs-tools/bin cd /tmp mkinitramfs -o /tmp/initrd.img-$OSRELEASE -v $OSRELEASE -cp -v /boot/vmlinuz-$OSRELEASE.efi.signed /tmp +cp -v /boot/vmlinuz-$OSRELEASE /tmp history -c diff --git a/client/boot-tools/includes/usr/bin/boot-tools/boottoolsSoftwareInstall.sh b/client/boot-tools/includes/usr/bin/boot-tools/boottoolsSoftwareInstall.sh index 5ad01285..95a64cf9 100755 --- a/client/boot-tools/includes/usr/bin/boot-tools/boottoolsSoftwareInstall.sh +++ b/client/boot-tools/includes/usr/bin/boot-tools/boottoolsSoftwareInstall.sh @@ -51,8 +51,8 @@ if [ "$OSRELEASE" == "3.7.6-030706-generic" ]; then rm -fr /tmp/kernel else # Instalar Kernel firmado del repositorio de paquetes. - apt-get -y --force-yes install linux-signed-image-${OSRELEASE} linux-headers-${OSRELEASE} dkms shim-signed - apt-get -y --force-yes install linux-image-extra-${OSRELEASE} 2>/dev/null + apt-get -y --force-yes install linux-image-${OSRELEASE} linux-headers-${OSRELEASE} dkms shim-signed + apt-get -y --force-yes install linux-modules-${OSRELEASE} linux-modules-extra-${OSRELEASE} 2>/dev/null fi # Valores para paquetes interactivos. diff --git a/doc/CHANGELOG.es.txt b/doc/CHANGELOG.es.txt index db9d9db3..fbd8408a 100644 --- a/doc/CHANGELOG.es.txt +++ b/doc/CHANGELOG.es.txt @@ -6,7 +6,12 @@ LISTA DE CAMBIOS CHANGELOG.es.txt Lista de cambios incluidos en OpenGnsys 1.1.1 (Espeto) ------------------------------------------------------ -Tickets resueltos en módulo OpenGnsys Client +Tickets resueltos en módulo OpenGnsys Cloning Engine: +#866 Si al restaurar usando la cache no hay espacio en la misma se finalizará la acción +#868 ConfiguraOs: error al desinstalar el agente de sistema operativo antiguo + +Tickets resueltos en módulo OpenGnsys Client: +#847 La ISO del ogLive debe de utilzar la revisión de Git y no de SVN #852 Apagado del cliente si tiempo de espera cambia de día Tickets resueltos en módulo OpenGnsys Web Admin Console: @@ -15,8 +20,10 @@ Tickets resueltos en módulo OpenGnsys Web Admin Console: #816 Marcar ordenador de profesor #824 Iniciar sistema restaurado (no integrado) #835 Problemas al listar plantillas en Nerboot Avanzado +#842 Internacionalización de la consola web Tickets genéricos resueltos: +#840 Usar Git como repositorio de código #843 Incluir nombre de versión diff --git a/installer/vagrant/Vagrantfile-boottools-vbox b/installer/vagrant/Vagrantfile-boottools-vbox index 0c1f081b..341db637 100644 --- a/installer/vagrant/Vagrantfile-boottools-vbox +++ b/installer/vagrant/Vagrantfile-boottools-vbox @@ -19,7 +19,7 @@ sed -i "s/XKBLAYOUT=.*/XKBLAYOUT=\"${LANG%_*}\"/" /etc/default/keyboard dpkg-reconfigure -fnoninteractive console-setup # Install dependencies. apt-get update -y -apt-get install -y subversion syslinux syslinux-efi syslinux-utils +apt-get install -y jq subversion syslinux syslinux-efi syslinux-utils # Prepare environment. groupadd opengnsys mkdir -p /opt/opengnsys/client /tmp/opengnsys_installer/opengnsys -- cgit v1.2.3-18-g5258 From 8076226512d306e652cfbf975661847172360c82 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Tue, 25 Sep 2018 18:07:49 +0200 Subject: #871: Dejar espacio libre entre particiones lógicas y alinear partición de caché en sector físico para discos con sectores de 4 KB. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/engine/Cache.lib | 2 +- client/engine/Disk.lib | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/client/engine/Cache.lib b/client/engine/Cache.lib index 8f6c9663..0e7f51ef 100755 --- a/client/engine/Cache.lib +++ b/client/engine/Cache.lib @@ -87,7 +87,7 @@ SIZE=$[$SIZECACHE*2] # Tamaño en sectores de 512 B. IOSIZE=$(fdisk -l $DISK | awk '/I\/O/ {print $4}') if [ $IOSIZE -eq 4096 ]; then END=$[$END-8192] - START=$[END-SIZE-8192] + START=$[END-SIZE+2048-(END-SIZE)%2048] else START=$[END-SIZE+1] fi diff --git a/client/engine/Disk.lib b/client/engine/Disk.lib index e9b1992b..a7db9209 100755 --- a/client/engine/Disk.lib +++ b/client/engine/Disk.lib @@ -73,15 +73,17 @@ SECTORS=$(ogGetLastSector $1) # Se recalcula el nº de sectores del disco 1, si existe partición de caché. CACHEPART=$(ogFindCache 2>/dev/null) [ "$ND" = "${CACHEPART% *}" ] && CACHESIZE=$(ogGetCacheSize 2>/dev/null | awk '{print $0*2}') -[ -n "$CACHESIZE" ] && SECTORS=$[SECTORS-CACHESIZE] # Sector de inicio (la partición 1 empieza en el sector 63). IODISCO=$(ogDiskToDev $1) IOSIZE=$(fdisk -l $IODISCO | awk '/I\/O/ {print $4}') if [ "$IOSIZE" == "4096" ]; then START=4096 + SECTORS=$[SECTORS-8192] + [ -n "$CACHESIZE" ] && SECTORS=$[SECTORS-CACHESIZE+2048-(SECTORS-CACHESIZE)%2048-1] else START=63 + [ -n "$CACHESIZE" ] && SECTORS=$[SECTORS-CACHESIZE] fi PART=1 @@ -127,6 +129,9 @@ while [ $# -gt 0 ]; do # Error si se supera el nº total de sectores. START=$[START+SIZE] [ $START -le $SECTORS ] || ogRaiseError $OG_ERR_FORMAT "$[START/2] > $[SECTORS/2]" || return $? + if [ "$IOSIZE" == "4096" -a $PART -gt 4 ]; then + START=$[START+2048] + fi PART=$[PART+1] shift done -- cgit v1.2.3-18-g5258 From 623659e5c4696e54e009591a8d81dde2ea559805 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Thu, 4 Oct 2018 09:20:27 +0200 Subject: #872: Updating README.md file. --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 618df4fa..0c5141a3 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,5 @@ OpenGnsys website: https://opengnsys.es/ ## Installation notes -Please, read installer/README.en.txt (or installer/README.es.txt) for detailled -instructions. +Please, read `doc/INSTALL.en.txt` (or `doc/INSTALL.es.txt`) for detailled instructions. -- cgit v1.2.3-18-g5258 From ea01a0db9f0d19f6f87a4c26de3679e5cc634e3f Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Thu, 4 Oct 2018 10:55:02 +0200 Subject: #872: Updating installation info (devel branch). --- README.md | 2 +- doc/INSTALL.en.txt | 97 +----------------------------------------- doc/INSTALL.es.txt | 101 +------------------------------------------- installer/INSTALL.en.txt | 92 ++++++++++++++++++++++++++++++++-------- installer/INSTALL.es.txt | 108 +++++++++++++++++++++++++++++++++-------------- installer/README.en.txt | 25 +++++++++++ installer/README.es.txt | 12 ++++-- 7 files changed, 188 insertions(+), 249 deletions(-) mode change 100644 => 120000 doc/INSTALL.en.txt mode change 100644 => 120000 doc/INSTALL.es.txt create mode 100644 installer/README.en.txt diff --git a/README.md b/README.md index 0c5141a3..bac23ac6 100644 --- a/README.md +++ b/README.md @@ -18,5 +18,5 @@ OpenGnsys website: https://opengnsys.es/ ## Installation notes -Please, read `doc/INSTALL.en.txt` (or `doc/INSTALL.es.txt`) for detailled instructions. +Please, read `installer/INSTALL.en.txt` (or `installer/INSTALL.es.txt`) for detailled instructions. diff --git a/doc/INSTALL.en.txt b/doc/INSTALL.en.txt deleted file mode 100644 index ef57ea18..00000000 --- a/doc/INSTALL.en.txt +++ /dev/null @@ -1,96 +0,0 @@ -Installing OpenGnsys Server 1.1.1 (codename "Espeto") -===================================================== - -Before installation -------------------- - -OpenGnsys Server 1.1.1 (Espeto) is mean to be installed under Ubuntu Server 16.04 LTS or newer, though it has also been tested under operating systems based on CentOS 7. - -Network connection is needed in order to download the required packages, the source code and the preconfigured client. - -Minimum storage requirements: -- 100 MB in /tmp (for the installation process) -- 600 MB in /var/lib/tftpboot (or /srv in Debian systems) for every installed ogLive client. -- 250 MB in the installation folder (/opt/opengnsys) plus 600 MB for every downloaded ISO image. -- Enough disk space for the image repository in /opt/opengnsys/images (it is recommended to mount it on an independent file system) - - - -Installing ----------- - -To install OpenGnsys, run opengnsys_installer.sh script after unpacking the release file (opengnsys-release.tar.gz) o downloading it directly from https://raw.githubusercontent.com/opengnsys/OpenGnsys/devel/installer/opengnsys_installer.sh - -Unpacking example: - tar xvzf opengnsys-1.1.0.tar.gz - cd opengnsys/installer - -Download examples: - - * Download with wget. - wget https://raw.githubusercontent.com/opengnsys/OpenGnsys/devel/installer/opengnsys_installer.sh - - * Download with curl. - curl https://raw.githubusercontent.com/opengnsys/OpenGnsys/devel/installer/opengnsys_installer.sh -o opengnsys_installer.sh - - -You must be root to run the installation script: - sudo bash opengnsys_installer.sh - - -The following information will be requested in order to configure the access to the service (a default value will be introduced if no parameter is indicated): - * MySQL root password - * Web console user and OpenGnsys Super Administrator - * Web console user's password - * Client's password for accessing remote services - * Choose which ogLive clients to install. - - -The following processes will be carried out: - * Gathering of the basic network parameters. - * Checking installed packages. - * Downloading and installing dependencies. - * Creating OpenGnsys basic folder sctructure. - * Download code from the repository to a temporal folder (/tmp/opengnsys_installer). In upcoming releases this process will not be necessary. - * Compiling and installing OpenGnsys services. - * Basic configuration of OpenGnsys network services (DHCP, PXE and Samba) using the existing configuration templates. - * Copying additional server management files. - * Creating database and configuring OpenGnsys administration console web server. - * Copying administration console pages. - * Copying OpenGnsys client folder structure. - * Downloading OpenGnsys client initial image. - * Basic configuration of OpenGnsys services using network parameters. - -Once the installation process is finished, you can start working with the system: - * Configuring DHCP. - * Adding information in the administration console. - * Customizing administration scripts. - * Creating start menus for the clients. - - - -Updating / upgrading --------------------- - -There is a system self-upgrading script with the following features: - * Network connection is needed to obtain the latest updates / upgrades. - * If the script updates itself, then it must be run once again. - * Services depending on the operating system will not be updated. - * Configuration files will not be modified. - -You must be root to run this script: - sudo /opt/opengnsys/lib/opengnsys_update.sh - - - -Uninstalling ------------- - -There is also an uninstallation script to remove the OpenGnsys components: - * OpenGnsys files and database will be deleted. - * Operating system packages and their configuration files will be preserved. - * The image folder and its content will not be deleted. - -You must be root to run this script: - sudo /opt/opengnsys/lib/opengnsys_uninstall.sh - diff --git a/doc/INSTALL.en.txt b/doc/INSTALL.en.txt new file mode 120000 index 00000000..c731350b --- /dev/null +++ b/doc/INSTALL.en.txt @@ -0,0 +1 @@ +../installer/INSTALL.en.txt \ No newline at end of file diff --git a/doc/INSTALL.es.txt b/doc/INSTALL.es.txt deleted file mode 100644 index 280ba648..00000000 --- a/doc/INSTALL.es.txt +++ /dev/null @@ -1,100 +0,0 @@ -Instalación de OpenGnsys Server 1.1.1 (Espeto) -============================================== - -Notas iniciales ---------------- - -Se presupone que el servidor de OpenGnsys va a ser instalado en una distribución del sistema operativo Ubuntu Server a partir de la versión 16.04 LTS (también ha sido probado en sistemas basados en CentOS 7). - -El serividor debe tener acceso a Internet para descargar los paquetes necesarios, el código del proyecto y el cliente preconfigurado. - -Requisitos mínimos de almacenamiento: -- 100 MB en el directorio /tmp (solo durante la instalación) -- 600 MB en el directorio /var/lib/tftpboot (o /srv en sistemas Debian) por cada cliente ogLive que se desee instalar. -- 250 MB en el directorio de instalación /opt/opengnsys más 600 MB por cada imagen ISO descargada de clientes ogLive. -- Estimar la capacidad necesaria para el repositorio de imágenes en /opt/opengnsys/images (es recomendable que este directorio se monte sobre un sistema de archivos independiente). - - -Instalación ------------ - -La instalación de OpenGnsys se realiza ejecutando el script de instalación opengnsys_installer.sh, el cual puede obtenerse descomprimiendo el fichero de la versión opengnsys-Version.tar.gz o descargándolo directamente de la dirección: https://raw.githubusercontent.com/opengnsys/OpenGnsys/devel/installer/opengnsys_installer.sh - -Ejemplos de descompresión del programa: - - tar xvzf opengnsys-1.1.0.tar.gz - cd opengnsys/installer - -Ejemplos de descarga con varias herramientas: - - * Descargar con wget. - wget https://raw.githubusercontent.com/opengnsys/OpenGnsys/devel/installer/opengnsys_installer.sh - - * Descargar con curl. - curl https://raw.githubusercontent.com/opengnsys/OpenGnsys/devel/installer/opengnsys_installer.sh -o opengnsys_installer.sh - - -El script de instalación debe ser ejecutado como usuario root: - sudo bash opengnsys_installer.sh - - -Dicho script solicitará por teclado la siguiente información para configurar el acceso al servicio (si no se indica un parámetro, toma el valor por defecto): - * Clave del usuario root de MySQL. - * Usuario de acceso a la consola web y super-administrador de OpenGnsys. - * Clave del usuario de acceso a la consola web. - * Clave de acceso del cliente a servicios remotos. - * Seleccionar cliente(s) ogLive para instalar. - -Se realizan los siguientes procesos: - * Obtener los parámetros básicos de la red. - * Comprobar los paquetes instalados. - * Descargar e instalar las dependencias que faltan. - * Crear la estructura básica de directorios de OpenGnsys. - * Descargar el repositorio de código en un directorio temporal (/tmp/opengnsys_installer). Nota: en versiones futuras este proceso no será necesario. - * Compilar e instalar los servicios de OpenGnsys. - * Configuración básica de los serviciios de red DHCP, PXE y NFS/Samba a partir de las plantillas de configuración - * Copiar ficheros complementarios de gestión del servidor. - * Crear la base de datos y configurar el servidor web de OpenGnsys Web Admin Console. - * Copiar los ficheros de las páginas de Web Admin Console. - * Copiar la estructura de directorios de OpenGnsys Client. - * Descargar la o las imágenes iniciales de OpenGnsys Client. - * Configuración básica de los serviciios de OpenGnsys a partir de los parámetros de red. - -Una vez finalizada la ejecución del instalador, puede empezarse a trabajar con el sistema: - * Configurar DHCP. - * Añadir datos en la consola de administración. - * Personalizar scripts de administración. - * Definir menús de inicio para los clientes. - - - -Actualización -------------- - -Se dispone de un script de auto-actualización del sistema, con las siguientes características: - * Es necesario conexión a Internet para obtener las últimas actualizaciones. - * Si el script se actualiza a sí mismo, debe ser ejecutado de nuevo. - * No se actualizan los servicios asociados al sistema operativo. - * No se modifican los ficheros de configuración. - - -El script debe ser ejecutado como usuario root: - sudo /opt/opengnsys/lib/opengnsys_update.sh - - - -Desinstalación --------------- - -También existe un script de desinstalación de los componentes de OpenGnsys, con las siguientes características: - * Solicita confirmación para ejecutar sus operaciones. - * Se eliminan los ficheros de OpenGnsys y su base de datos. - * No se eliminan ni paquetes del sistema operativo ni sus ficheros de configuración. - * No se elimina el directorio de las imágenes ni su contenido. - * No se eliminan los clientes ogLive ni las plantillas PXE. - - -El script debe ser ejecutado como usuario root: - sudo /opt/opengnsys/lib/opengnsys_uninstall.sh - - diff --git a/doc/INSTALL.es.txt b/doc/INSTALL.es.txt new file mode 120000 index 00000000..b4274ba4 --- /dev/null +++ b/doc/INSTALL.es.txt @@ -0,0 +1 @@ +../installer/INSTALL.es.txt \ No newline at end of file diff --git a/installer/INSTALL.en.txt b/installer/INSTALL.en.txt index a98b7931..fac27547 100644 --- a/installer/INSTALL.en.txt +++ b/installer/INSTALL.en.txt @@ -1,37 +1,95 @@ - -Installing and updating OpenGnsys +Installing OpenGnsys Server 1.1.0 ================================= +Before installation +------------------- +OpenGnsys Server 1.1.0 is meant to be installed under Ubuntu Server 16.04 LTS or newer, though it has also been tested under operating systems based on CentOS 7. -Installing OpenGnsys --------------------- +Network connection is needed in order to download the required packages, the source code and the preconfigured client. + +Minimum storage requirements: +- 100 MB in /tmp (for the installation process) +- 600 MB in /var/lib/tftpboot (or /srv in Debian systems) for every installed ogLive client. +- 250 MB in the installation folder (/opt/opengnsys) plus 600 MB for every downloaded ISO image. +- Enough disk space for the image repository in /opt/opengnsys/images (it is recommended to mount it on an independent file system) + + + +Installing +---------- +To install OpenGnsys, run opengnsys_installer.sh script after unpacking the release file (opengnsys-release.tar.gz) or after downloading it directly from https://raw.githubusercontent.com/opengnsys/OpenGnsys/master/installer/opengnsys_installer.sh -Run opengnsys_installer.sh script as "root" to install all its dependencies, to install the OpenGnsys components, and to make the initial configuration. +Unpacking example: + tar xvzf opengnsys-Version.tar.gz + cd opengnsys/installer - sudo bash opengnsys_installer.sh +Downloading examples: -Follow the instructions. + * Download with wget. + wget https://raw.githubusercontent.com/opengnsys/OpenGnsys/master/installer/opengnsys_installer.sh + * Download with curl. + curl https://raw.githubusercontent.com/opengnsys/OpenGnsys/master/installer/opengnsys_installer.sh -o opengnsys_installer.sh -Updating OpenGnsys ------------------- -Run opengnsys_update.sh script as "root" to update all OpenGnsys components from the Subversion repository: +You must be root to run the installation script: + sudo bash opengnsys_installer.sh - sudo bash /opt/opengnsys/lib/opengnsys_update.sh -Follow the instructions. +The following information will be requested in order to configure the access to the service (a default value will be introduced if no parameter is indicated): + * MySQL root password + * Web console user and OpenGnsys Super Administrator + * Web console user's password + * Client's password for accessing remote services + * Choose which ogLive clients to install. + +The following processes will be carried out: + * Gathering of the basic network parameters. + * Checking installed packages. + * Downloading and installing dependencies. + * Creating OpenGnsys basic folder sctructure. + * Downloading code from the repository to a temporal folder (/tmp/opengnsys_installer). In upcoming releases this process will not be necessary. + * Compiling and installing OpenGnsys services. + * Basic configuration of OpenGnsys network services (DHCP, PXE and Samba) using the existing configuration templates. + * Copying additional server management files. + * Creating database and configuring OpenGnsys administration console web server. + * Copying administration console pages. + * Copying OpenGnsys client folder structure. + * Downloading OpenGnsys client initial image. + * Basic configuration of OpenGnsys services using network parameters. + +Once the installation process is finished, you can start working with the system: + * Configuring DHCP. + * Adding information in the administration console. + * Customizing administration scripts. + * Creating start menus for the clients. + + + +Updating / upgrading +-------------------- +There is a system self-upgrading script with the following features: + * Network connection is needed to obtain the latest updates / upgrades. + * If the script updates itself, then it must be run once again. + * Services depending on the operating system will not be updated. + * Configuration files will not be modified. -Uninstalling OpenGnsys ----------------------- +You must be root to run this script: + sudo /opt/opengnsys/lib/opengnsys_update.sh + -Run opengnsys_uninstall.sh script as "root" to uninstall all OpenGnsys components: - sudo bash /opt/opengnsys/lib/opengnsys_uninstall.sh +Uninstalling +------------ -Follow the instructions. +There is also an uninstallation script to remove the OpenGnsys components: + * OpenGnsys files and database will be deleted. + * Operating system packages and their configuration files will be preserved. + * The image folder and its content will not be deleted. +You must be root to run this script: + sudo /opt/opengnsys/lib/opengnsys_uninstall.sh diff --git a/installer/INSTALL.es.txt b/installer/INSTALL.es.txt index 0fd5ba75..e585a507 100644 --- a/installer/INSTALL.es.txt +++ b/installer/INSTALL.es.txt @@ -1,54 +1,100 @@ -Instalación y Actualización de OpenGnsys 1.1.1pre -================================================= +Instalación de OpenGnsys Server 1.1.0 +===================================== +Notas iniciales +--------------- -Instalación inicial -------------------- +Se presupone que el servidor de OpenGnsys 1.1.0 va a ser instalado en una distribución del sistema operativo Ubuntu Server a partir de la versión 16.04 LTS (también ha sido probado en sistemas basados en CentOS 7). -1. Obtener el instalador. +El serividor debe tener acceso a Internet para descargar los paquetes necesarios, el código del proyecto y el cliente preconfigurado. -Descargar una versión completa y desccomprimir el fichero "opengnsys-version.tar.gz": - tar xvzf opengnsys-version.tar.gz - cd opengnsys/installer +Requisitos mínimos de almacenamiento: +- 100 MB en el directorio /tmp (solo durante la instalación) +- 600 MB en el directorio /var/lib/tftpboot (o /srv en sistemas Debian) por cada cliente ogLive que se desee instalar. +- 250 MB en el directorio de instalación /opt/opengnsys más 600 MB por cada imagen ISO descargada de clientes ogLive. +- Estimar la capacidad necesaria para el repositorio de imágenes en /opt/opengnsys/images (es recomendable que este directorio se monte sobre un sistema de archivos independiente). -O bien, descargar el instalador desde la última reversión del repositorio: - wget https://raw.githubusercontent.com/opengnsys/OpenGnsys/devel/installer/opengnsys_installer.sh -Opcionalmente, puede descargarse la imagen del cliente; si no se realiza este paso, el instalador la descargará automáticamente. - wget https://opengnsys.es/downloads/ogLive-versioncliente.iso +Instalación +----------- + +La instalación de OpenGnsys se realiza ejecutando el script de instalación opengnsys_installer.sh, el cual puede obtenerse descomprimiendo el fichero de la versión opengnsys-Version.tar.gz o descargándolo directamente de la dirección: https://raw.githubusercontent.com/opengnsys/OpenGnsys/devel/installer/opengnsys_installer.sh + +Ejemplos de descompresión del programa: + + tar xvzf opengnsys-Version.tar.gz + cd opengnsys/installer + +Ejemplos de descarga con varias herramientas: + + * Descargar con wget. + wget https://raw.githubusercontent.com/opengnsys/OpenGnsys/master/installer/opengnsys_installer.sh + + * Descargar con curl. + curl https://raw.githubusercontent.com/opengnsys/OpenGnsys/master/installer/opengnsys_installer.sh -o opengnsys_installer.sh + + +El script de instalación debe ser ejecutado como usuario root: + sudo bash opengnsys_installer.sh -2. Ejecutar el instalador como root: - sudo bash opengnsys_installer.sh Dicho script solicitará por teclado la siguiente información para configurar el acceso al servicio (si no se indica un parámetro, toma el valor por defecto): * Clave del usuario root de MySQL. * Usuario de acceso a la consola web y super-administrador de OpenGnsys. * Clave del usuario de acceso a la consola web. - * Clave de acceso del cliente a servicios remotos. + * Clave de acceso del cliente a servicios remotos. * Seleccionar cliente(s) ogLive para instalar. +Se realizan los siguientes procesos: + * Obtener los parámetros básicos de la red. + * Comprobar los paquetes instalados. + * Descargar e instalar las dependencias que faltan. + * Crear la estructura básica de directorios de OpenGnsys. + * Descargar el repositorio de código en un directorio temporal (/tmp/opengnsys_installer). Nota: en versiones futuras este proceso no será necesario. + * Compilar e instalar los servicios de OpenGnsys. + * Configuración básica de los serviciios de red DHCP, PXE y NFS/Samba a partir de las plantillas de configuración + * Copiar ficheros complementarios de gestión del servidor. + * Crear la base de datos y configurar el servidor web de OpenGnsys Web Admin Console. + * Copiar los ficheros de las páginas de Web Admin Console. + * Copiar la estructura de directorios de OpenGnsys Client. + * Descargar la o las imágenes iniciales de OpenGnsys Client. + * Configuración básica de los serviciios de OpenGnsys a partir de los parámetros de red. -Actaulización de ficheros -------------------------- +Una vez finalizada la ejecución del instalador, puede empezarse a trabajar con el sistema: + * Configurar DHCP. + * Añadir datos en la consola de administración. + * Personalizar scripts de administración. + * Definir menús de inicio para los clientes. -Ejecutar el script de actualización como usuario root: - sudo /opt/opengnsys/lib/opengnsys_update.sh -Notas importantes. -1. Es necesario conexión a Internet para obtener las últimas actualizaciones. -2. Si el script se actualiza a sí mismo, pedirá automáticamente que vuelva a ser ejecutado para terminar de actualizar todo el sistema. -3. El programa de actualización no modifica ficheros de configuración, no actualiza la bases de datos y no modifica ficheros de imágenes. +Actualización +------------- -Desinstalar OpenGnsys ---------------------- +Se dispone de un script de auto-actualización del sistema, con las siguientes características: + * Es necesario conexión a Internet para obtener las últimas actualizaciones. + * Si el script se actualiza a sí mismo, debe ser ejecutado de nuevo. + * No se actualizan los servicios asociados al sistema operativo. + * No se modifican los ficheros de configuración. -Ejecutar el script de actualización como usuario root: - sudo /opt/opengnsys/lib/opengnsys_uninstall.sh -Notas importantes. -1. Para poder conservar la información, es recomendable hacer copia de seguridad del servidor antes de desinstalar. -2. Se solicita confirmación por parte del usuario antes de ejecutar cualquier operación. -3. El programa de desinstalación no elimina los ficheros de imágenes, ni los clientes ogLive instalados, no desinstala ningún paquete del sistema operativo incluido en el proceso de instalación y no detiene, ni desconfigura ningún otro servicio auxiliar a OpenGnsys. +El script debe ser ejecutado como usuario root: + sudo /opt/opengnsys/lib/opengnsys_update.sh + + +Desinstalación +-------------- + +También existe un script de desinstalación de los componentes de OpenGnsys, con las siguientes características: + * Solicita confirmación para ejecutar sus operaciones. + * Se eliminan los ficheros de OpenGnsys y su base de datos. + * No se eliminan ni paquetes del sistema operativo ni sus ficheros de configuración. + * No se elimina el directorio de las imágenes ni su contenido. + * No se eliminan los clientes ogLive ni las plantillas PXE. + + +El script debe ser ejecutado como usuario root: + sudo /opt/opengnsys/lib/opengnsys_uninstall.sh + diff --git a/installer/README.en.txt b/installer/README.en.txt new file mode 100644 index 00000000..277040da --- /dev/null +++ b/installer/README.en.txt @@ -0,0 +1,25 @@ + +OpenGnsys Installer README +=============================== + + +This directory contains documentation and maintenance scripts for installing, +updating and uninstalling an OpenGnsys Server. + + +- INSTALL.en.txt installation information (English) +- INSTALL.es.txt installation information (Spanish) +- LICENSE.en.txt licence information (English) +- ogagentpkgs-Version.tar.gz agent for operationg systems (OGAgent) +- opengnsys_export.sh script to export data to another OpenGnsys Server +- opengnsys_import.sh script to import data from another OpenGnsys Server +- opengnsys_installer.sh installation script +- opengnsys_uninstall.sh uninstallation script +- opengnsys_update.sh updating script + +- opengnsys_makecompress.sh script to generate a compress file with our last release +- ogagent-devel-installer.sh script to prepare OGAgent compillation environment + +- vagrant Vagrant configuration directory to deploy some virtual + environments + diff --git a/installer/README.es.txt b/installer/README.es.txt index a7879033..0642e4ed 100644 --- a/installer/README.es.txt +++ b/installer/README.es.txt @@ -7,14 +7,18 @@ Este directorio contiene la documentación y los programas para instalar, actual eliminar el Proyecto OpenGnsys. -- INSTALL.es.txt información de instalación y desinistalación -- LICENSE.en.txt información de licencia de uso +- INSTALL.en.txt información de instalación y desinistalación (inglés) +- INSTALL.es.txt información de instalación y desinistalación (español) +- LICENSE.en.txt información de licencia de uso (inglés) +- ogagentpkgs-Version.tar.gz agentes para sistemas operativos (OGAgent) +- opengnsys_export.sh programa para exportar datos a otro servidor OpenGnsys +- opengnsys_import.sh programa para importar datos desde otro servidor OpenGnsys - opengnsys_installer.sh programa de instalación del serviidor -- opengnsys_makecompress.sh programa para descargar la última revisión del proyecto - y generar un fichero comprimido - opengnsys_uninstall.sh programa de desinstalación del serviidor - opengnsys_update.sh programa de actualización del serviidor +- opengnsys_makecompress.sh programa para descargar la última revisión del proyecto + y generar un fichero comprimido - ogagent-devel-installer.sh programa de preparación del entorno de desarrollo y compilación de agentes OGAgent para sistemas operativos -- cgit v1.2.3-18-g5258 From 9215580935651b48edc831a2f18adf52da9b3750 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Thu, 4 Oct 2018 11:57:06 +0200 Subject: #784: Using PHP-FPM instead of Mod-PHP to improve Apache performance. --- doc/CHANGELOG.es.txt | 4 ++++ installer/opengnsys_installer.sh | 24 ++++++++++++++++-------- installer/opengnsys_update.sh | 16 +++++++++------- server/etc/apache.conf.tmpl | 7 +++++++ 4 files changed, 36 insertions(+), 15 deletions(-) diff --git a/doc/CHANGELOG.es.txt b/doc/CHANGELOG.es.txt index fbd8408a..4a966140 100644 --- a/doc/CHANGELOG.es.txt +++ b/doc/CHANGELOG.es.txt @@ -7,6 +7,10 @@ Lista de cambios incluidos en OpenGnsys 1.1.1 (Espeto) ------------------------------------------------------ Tickets resueltos en módulo OpenGnsys Cloning Engine: +#863 smartPartition: incluir scritps de ejemplo de particionado personalizado para múltiples d +iscos duros +#864 FirstRunOnceWindows: scripts de ejemplo para installMiniSetup con ratón y teclado desacti +vado #866 Si al restaurar usando la cache no hay espacio en la misma se finalizará la acción #868 ConfiguraOs: error al desinstalar el agente de sistema operativo antiguo diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index ccd4de0e..230458ec 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -141,8 +141,9 @@ OPENGNSYS_DB_CREATION_FILE=opengnsys/admin/Database/${OPENGNSYS_DATABASE}.sql # - STARTSERVICE, ENABLESERVICE - iniciar y habilitar un servicio # - STOPSERVICE, DISABLESERVICE - parar y deshabilitar un servicio # - APACHESERV, APACHECFGDIR, APACHESITESDIR, APACHEUSER, APACHEGROUP - servicio y configuración de Apache -# - APACHESSLMOD, APACHEENABLESSL, APACHEMAKECERT - habilitar módulo Apache y certificado SSL +# - APACHEENABLEMODS, APACHEENABLESSL, APACHEMAKECERT - habilitar módulos y certificado SSL # - APACHEENABLEOG, APACHEOGSITE, - habilitar sitio web de OpenGnsys +# - PHPFPMSERV - servicio PHP FastCGI Process Manager para Apache # - INETDSERV - servicio Inetd # - FIREWALLSERV - servicio de cortabuegos IPTables/FirewallD # - DHCPSERV, DHCPCFGDIR - servicio y configuración de DHCP @@ -169,7 +170,7 @@ OSVERSION="${OSVERSION%%.*}" # Configuración según la distribución GNU/Linux (usar minúsculas). case "$OSDISTRIB" in ubuntu|debian|linuxmint) - DEPENDENCIES=( subversion apache2 php php-ldap libapache2-mod-php mysql-server php-mysql isc-dhcp-server bittorrent tftp-hpa tftpd-hpa xinetd build-essential g++-multilib libmysqlclient-dev wget curl doxygen graphviz bittornado ctorrent samba rsync unzip netpipes debootstrap schroot squashfs-tools btrfs-tools procps arp-scan realpath php-curl gettext moreutils jq wakeonlan udpcast shim-signed grub-efi-amd64-signed ) + DEPENDENCIES=( subversion apache2 php php-ldap php-fpm libapache2-mod-fastcgi mysql-server php-mysql isc-dhcp-server bittorrent tftp-hpa tftpd-hpa xinetd build-essential g++-multilib libmysqlclient-dev wget curl doxygen graphviz bittornado ctorrent samba rsync unzip netpipes debootstrap schroot squashfs-tools btrfs-tools procps arp-scan realpath php-curl gettext moreutils jq wakeonlan udpcast shim-signed grub-efi-amd64-signed ) UPDATEPKGLIST="apt-get update" INSTALLPKG="apt-get -y install --force-yes" CHECKPKG="dpkg -s \$package 2>/dev/null | grep Status | grep -qw install" @@ -188,8 +189,7 @@ case "$OSDISTRIB" in APACHEOGSITE=opengnsys APACHEUSER="www-data" APACHEGROUP="www-data" - APACHESSLMOD="a2enmod ssl" - APACHEREWRITEMOD="a2enmod rewrite" + APACHEENABLEMODS="a2enmod ssl rewrite proxy_fcgi fastcgi actions alias" APACHEENABLESSL="a2ensite default-ssl" APACHEENABLEOG="a2ensite $APACHEOGSITE" APACHEMAKECERT="make-ssl-cert generate-default-snakeoil --force-overwrite" @@ -199,6 +199,7 @@ case "$OSDISTRIB" in INETDCFGDIR=/etc/xinetd.d MYSQLSERV=mysql MARIADBSERV=mariadb + PHPFPMSERV=php-fpm RSYNCSERV=rsync RSYNCCFGDIR=/etc SAMBASERV=smbd @@ -302,6 +303,7 @@ case "$OSDISTRIB" in add-apt-repository -y ppa:ondrej/php eval $UPDATEPKGLIST PHP7VERSION=$(apt-cache pkgnames php7 | sort | head -1) + PHPFPM="${PHP7VERSION}-fpm" DEPENDENCIES=( ${DEPENDENCIES[@]//php/$PHP7VERSION} ) fi # Adaptar dependencias para libmysqlclient. @@ -1138,6 +1140,7 @@ function installWebConsoleApacheConf() local path_opengnsys_base="$1" local path_apache2_confd="$2" local CONSOLEDIR=${path_opengnsys_base}/www + local sockfile if [ ! -d $path_apache2_confd ]; then errorAndLog "${FUNCNAME}(): path to apache2 conf.d can not found, verify your server installation" @@ -1148,12 +1151,17 @@ function installWebConsoleApacheConf() echoAndLog "${FUNCNAME}(): creating apache2 config file.." + # Avtivar PHP-FPM. + echoAndLog "${FUNCNAME}(): configuring PHP-FPM" + service=$PHPFPMSERV + $ENABLESERVICE; $STARTSERVICE + sockfile=$(find /run/php -name "php*.sock" -type s -print 2>/dev/null) + + # Activar módulos de Apache. + $APACHEENABLEMODS # Activar HTTPS. - $APACHESSLMOD $APACHEENABLESSL $APACHEMAKECERT - # Activar módulo Rewrite. - $APACHEREWRITEMOD # Genera configuración de consola web a partir del fichero plantilla. if [ -n "$(apachectl -v | grep "2\.[0-2]")" ]; then # Configuración para versiones anteriores de Apache. @@ -1161,7 +1169,7 @@ function installWebConsoleApacheConf() $WORKDIR/opengnsys/server/etc/apache-prev2.4.conf.tmpl > $path_apache2_confd/$APACHESITESDIR/${APACHEOGSITE} else # Configuración específica a partir de Apache 2.4 - sed -e "s,CONSOLEDIR,$CONSOLEDIR,g" \ + sed -e "s,CONSOLEDIR,$CONSOLEDIR,g; s,SOCKFILE,$sockfile,g" \ $WORKDIR/opengnsys/server/etc/apache.conf.tmpl > $path_apache2_confd/$APACHESITESDIR/${APACHEOGSITE}.conf fi $APACHEENABLEOG diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index be36d643..8ebd4080 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -117,7 +117,7 @@ function autoConfigure() # Configuración según la distribución de Linux. if [ -f /etc/debian_version ]; then # Distribución basada en paquetes Deb. - DEPENDENCIES=( curl rsync btrfs-tools procps arp-scan realpath php-curl gettext moreutils jq wakeonlan udpcast ) + DEPENDENCIES=( curl rsync btrfs-tools procps arp-scan realpath php-curl gettext moreutils jq wakeonlan udpcast php-fpm libapache2-mod-fastcgi ) UPDATEPKGLIST="add-apt-repository -y ppa:ondrej/php; apt-get update" INSTALLPKGS="apt-get -y install" DELETEPKGS="apt-get -y purge" @@ -132,6 +132,8 @@ function autoConfigure() SERVICESTATUS="eval /etc/init.d/\$service status" fi ENABLESERVICE="eval update-rc.d \$service defaults" + APACHEENABLEMODS="ssl rewrite proxy_fcgi fastcgi actions alias" + APACHEDISABLEMODS="php" APACHEUSER="www-data" APACHEGROUP="www-data" INETDCFGDIR=/etc/xinetd.d @@ -529,15 +531,14 @@ EOT # Configurar HTTPS y exportar usuario y grupo del servicio Apache. function apacheConfiguration () { - local config template + local config template module socketfile - # Activar HTTPS (solo actualizando desde versiones anteriores a 1.0.2) y - # activar módulo Rewrite (solo actualizaciones desde 1.0.x a 1.1.x). + # Activar módulos de Apache. if [ -e $APACHECFGDIR/sites-available/opengnsys.conf ]; then echoAndLog "${FUNCNAME}(): Configuring Apache modules" a2ensite default-ssl - a2enmod ssl - a2enmod rewrite + for module in $APACHEENABLEMODS; do a2enmod -q "$module"; done + for module in $APACHEDISABLEMODS; do a2dismod -q "${module//PHP7VERSION}"; done a2ensite opengnsys elif [ -e $APACHECFGDIR/conf.modules.d ]; then echoAndLog "${FUNCNAME}(): Configuring Apache modules" @@ -551,7 +552,8 @@ function apacheConfiguration () else template=$WORKDIR/opengnsys/server/etc/apache.conf.tmpl fi - sed -e "s,CONSOLEDIR,$INSTALL_TARGET/www,g" $template > $config + sockfile=$(find /run/php -name "php*.sock" -type s -print 2>/dev/null) + sed -e "s,CONSOLEDIR,$INSTALL_TARGET/www,g; s/SOCKETFILE/$socketfile/g" $template > $config done # Reiniciar Apache. diff --git a/server/etc/apache.conf.tmpl b/server/etc/apache.conf.tmpl index ab49503d..d637c2fe 100644 --- a/server/etc/apache.conf.tmpl +++ b/server/etc/apache.conf.tmpl @@ -2,6 +2,13 @@ Alias /opengnsys CONSOLEDIR +# PHP-FPM configuration + + + SetHandler "proxy:unix:SOCKFILE|fcgi://localhost" + + + RewriteEngine On # Redirect HTTP to HTTPS and default configuration. -- cgit v1.2.3-18-g5258 From 115525a55f2665f12fa938c7bdd0ab00123172d7 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Wed, 10 Oct 2018 11:02:55 +0200 Subject: #850: Script {{{checkrepo}}} creates the repository info file if it doesn't exist and uses a new global functions file. --- repoman/bin/checkrepo | 49 +++++------------------------------ server/lib/ogfunctions.sh | 65 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 42 deletions(-) create mode 100755 server/lib/ogfunctions.sh diff --git a/repoman/bin/checkrepo b/repoman/bin/checkrepo index b38a689b..3a7448a2 100755 --- a/repoman/bin/checkrepo +++ b/repoman/bin/checkrepo @@ -1,9 +1,9 @@ #!/bin/bash #/** -# checkrepo #@file checkrepo -#@brief Generate repository information in a JSON file. +#@brief Maintain repository information in a JSON file. +#@usage checkrepo #@warning This script uses "jq" command. #@version 1.1.0 - Initial version. #@author Ramón M. Gómez - ETSII Univ. Sevilla @@ -18,15 +18,8 @@ IMAGESDIR=$OPENGNSYS/images INFOFILE=$OPENGNSYS/etc/repoinfo.json -# Auxiliar functions. - -# Metafunction to check if JSON result exists. -function jq() { - local OUTPUT - OUTPUT=$($JQ "$@") || return $? - [[ "$OUTPUT" = "null" ]] && return 1 - echo "$OUTPUT" -} +# Functions. +source $OPENGNSYS/lib/ogfunctions.sh # Create/edit JSON file about installed ogLive clients. function addToJson() { @@ -105,7 +98,7 @@ EOT # Create new JSON file. if [ -z "$OUNAME" ]; then cat << EOT | jq . > $INFOFILE -{"directory":"$IMAGESDIR","images":[$JSON],"ous":[]} +{"directory":"$IMAGESDIR","images":[${IMAGENAME+$JSON}],"ous":[]} EOT else cat << EOT | jq . > $INFOFILE @@ -115,34 +108,6 @@ EOT fi } -# Show an error message. -function raiseError() { - case "$1" in - usage) - echo "$PROG: Usage error: Type \"$PROG help\"" >&2 - exit 1 ;; - notfound) - echo "$PROG: Resource not found: $2" >&2 - exit 2 ;; - access) - echo "$PROG: Access error: $2" >&2 - exit 3 ;; - *) - echo "$PROG: Unknown error" >&2 - exit 1 ;; - esac -} - -# Command functions. - -# Show help message. -function help() { - cat << EOT -$PROG: maintain the repository information. -Usage: $PROG -EOT -} - # Check for file-based images to update the repository configuration file. function checkfiles() { local IMAGES IMG INFO DATA @@ -220,8 +185,8 @@ function checkremoved() { # Main progrram. # Check dependencies. -[ ! -w "$(dirname "$INFOFILE")" ] && raiseError access "$INFOFILE" -JQ=$(which jq 2>/dev/null) || raiseError notfound "Need to install \"jq\"." +[ -w "$(dirname "$INFOFILE")" ] || raiseError access "$INFOFILE" +[ -e "$INFOFILE" ] || addToJson which sponge &>/dev/null || raiseError notfound "Need to install \"moreutils\"." checkfiles diff --git a/server/lib/ogfunctions.sh b/server/lib/ogfunctions.sh new file mode 100755 index 00000000..51de6b77 --- /dev/null +++ b/server/lib/ogfunctions.sh @@ -0,0 +1,65 @@ +#!/bin/bash +#/** +#@file ogfunctions.sh +#@brief Generic functions for OpenGnsys Server and OpenGnsys Repository. +#@version 1.1.1 - Initial version +#@author Ramón M. Gómez, ETSII Universidad de Sevilla +#@date 2017-10-08 +#*/ + + +# Showing an error message. +function raiseError() { + case "$1" in + usage) + echo "$PROG: Usage error: Type \"$PROG help\"" >&2 + exit 1 ;; + notfound) + echo "$PROG: Resource not found: $2" >&2 + exit 2 ;; + access) + echo "$PROG: Access error: $2" >&2 + exit 3 ;; + download) + echo "$PROG: Download error: $2" >&2 + exit 4 ;; + *) + echo "$PROG: Unknown error" >&2 + exit 1 ;; + esac +} + +# Showing help message. +function help() { + [ -n "$1" ] && DESCRIPTION="$1" || DESCRIPTION=$(grep "^#@brief" "$0" | cut -f2- -d" ") + shift + if [ -n "$1" ]; then + USAGE="$1" + shift + else + USAGE=$(grep "^#@usage" "$0" | cut -f2- -d" ") + [ -n "$USAGE" ] && PARAMS=$(awk '$1=="#@param" {sub($1,""); print "\t",$0}' "$0") + fi + # Showing help. + echo "$PROG: ${DESCRIPTION:-"no description"}" + echo "Usage: ${USAGE:-"no usage info"}" + [ -n "$PARAMS" ] && echo -e "$PARAMS" + if [ -n "$*" ]; then + echo "Examples:" + while (( "$#" )); do + echo -e "\t$1" + shift + done + fi + exit 0 +} + +# Metafunction to check if JSON result exists. +JQ=$(which jq 2>/dev/null) || raiseError notfound "Need to install \"jq\"." +function jq() { + local OUTPUT + OUTPUT=$($JQ "$@") || return $? + [[ "$OUTPUT" = "null" ]] && return 1 + echo "$OUTPUT" +} + -- cgit v1.2.3-18-g5258 From b1360126e3730f01b3c1cb7ac0362e3679c28a67 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Wed, 10 Oct 2018 14:02:43 +0200 Subject: #850: Correct an error. --- repoman/bin/checkrepo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repoman/bin/checkrepo b/repoman/bin/checkrepo index 3a7448a2..5b50dcda 100755 --- a/repoman/bin/checkrepo +++ b/repoman/bin/checkrepo @@ -98,7 +98,7 @@ EOT # Create new JSON file. if [ -z "$OUNAME" ]; then cat << EOT | jq . > $INFOFILE -{"directory":"$IMAGESDIR","images":[${IMAGENAME+$JSON}],"ous":[]} +{"directory":"$IMAGESDIR","images":[${IMAGENAME:+$JSON}],"ous":[]} EOT else cat << EOT | jq . > $INFOFILE -- cgit v1.2.3-18-g5258 From bb3f68933887950c3e7e51402896625a3455d8a5 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Thu, 11 Oct 2018 08:29:30 +0000 Subject: #867 Se incluyen pagina para el manual de usuarios y ficheros de idiomas. La versión se toma del fichero VERSION.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/WebConsole/idiomas/php/cat/ayuda_cat.php | 15 ++++ admin/WebConsole/idiomas/php/cat/changelog_cat.php | 9 +++ admin/WebConsole/idiomas/php/cat/engine_cat.php | 10 +++ admin/WebConsole/idiomas/php/eng/ayuda_eng.php | 15 ++++ admin/WebConsole/idiomas/php/eng/changelog_eng.php | 9 +++ admin/WebConsole/idiomas/php/eng/engine_eng.php | 10 +++ admin/WebConsole/idiomas/php/esp/ayuda_esp.php | 16 ++++ admin/WebConsole/idiomas/php/esp/changelog_esp.php | 9 +++ admin/WebConsole/idiomas/php/esp/engine_esp.php | 10 +++ admin/WebConsole/principal/acercade.php | 89 ---------------------- admin/WebConsole/principal/ayuda.php | 7 +- admin/WebConsole/principal/changelog.php | 4 +- admin/WebConsole/principal/manual.php | 59 ++++++++++++++ 13 files changed, 168 insertions(+), 94 deletions(-) create mode 100644 admin/WebConsole/idiomas/php/cat/ayuda_cat.php create mode 100644 admin/WebConsole/idiomas/php/cat/changelog_cat.php create mode 100644 admin/WebConsole/idiomas/php/cat/engine_cat.php create mode 100644 admin/WebConsole/idiomas/php/eng/ayuda_eng.php create mode 100644 admin/WebConsole/idiomas/php/eng/changelog_eng.php create mode 100644 admin/WebConsole/idiomas/php/eng/engine_eng.php create mode 100644 admin/WebConsole/idiomas/php/esp/ayuda_esp.php create mode 100644 admin/WebConsole/idiomas/php/esp/changelog_esp.php create mode 100644 admin/WebConsole/idiomas/php/esp/engine_esp.php create mode 100644 admin/WebConsole/principal/manual.php diff --git a/admin/WebConsole/idiomas/php/cat/ayuda_cat.php b/admin/WebConsole/idiomas/php/cat/ayuda_cat.php new file mode 100644 index 00000000..df74829d --- /dev/null +++ b/admin/WebConsole/idiomas/php/cat/ayuda_cat.php @@ -0,0 +1,15 @@ +project)) { } ?>

- - - - - Administración web de aulas - - - - - - - - - - - -

*

-

 

-

 

-

 

-

 

-

OpenGnsys

- -

- - - -'; //de ser un directorio lo envolvemos entre corchetes - } - } - else - { - if (\$archivo == 'Inicio.php' || \$archivo == '.' || \$archivo == '..') - {}else{ - \$fichero[] = \$archivo; - } - } -} -sort(\$fichero); -foreach (\$fichero as \$ficheros) { - echo '

'.\$ficheros.'

'; -} - -?> - -
- - - - - -
- Tu navegador no soporta frames!!'; - ?> -
-"); -fclose($crearficheroinicio); - - -} -?> - -

diff --git a/admin/WebConsole/principal/ayuda.php b/admin/WebConsole/principal/ayuda.php index ef4f0fdc..b110c85e 100644 --- a/admin/WebConsole/principal/ayuda.php +++ b/admin/WebConsole/principal/ayuda.php @@ -7,9 +7,10 @@ include_once("../includes/ctrlacc.php"); include_once("../idiomas/php/".$idioma."/ayuda_".$idioma.".php"); // Añadir versión. -$versionfile="../../doc/VERSION.txt"; -$version=(file_exists ($versionfile)) ? file_get_contents($versionfile, TRUE) : ""; +$data = json_decode(@file_get_contents('../../doc/VERSION.json')); +$version=(empty($data->project)) ? "OpenGnsys" : @$data->project.' '.@$data->version.' '.(isset($data->codename) ? '('.$data->codename.') ' : '').@$data->release;; ?> + @@ -24,7 +25,7 @@ $version=(file_exists ($versionfile)) ? file_get_contents($versionfile, TRUE) :
-

+

 

diff --git a/admin/WebConsole/principal/changelog.php b/admin/WebConsole/principal/changelog.php index 643a063d..c3fd6cff 100644 --- a/admin/WebConsole/principal/changelog.php +++ b/admin/WebConsole/principal/changelog.php @@ -6,8 +6,8 @@ include_once("../includes/ctrlacc.php"); include_once("../idiomas/php/".$idioma."/changelog_".$idioma.".php"); // Añadir versión. -$versionfile="../../doc/VERSION.txt"; -$version=(file_exists ($versionfile)) ? file_get_contents($versionfile, TRUE) : ""; +$data = json_decode(@file_get_contents('../../doc/VERSION.json')); +$version=(empty($data->project)) ? "OpenGnsys" : @$data->project.' '.@$data->version.' '.(isset($data->codename) ? '('.$data->codename.') ' : '').@$data->release;; $changelogfile="../../doc/CHANGELOG.es.txt"; $changelog=(file_exists ($changelogfile)) ? file_get_contents($changelogfile, TRUE) : ""; diff --git a/admin/WebConsole/principal/manual.php b/admin/WebConsole/principal/manual.php new file mode 100644 index 00000000..5bd2259f --- /dev/null +++ b/admin/WebConsole/principal/manual.php @@ -0,0 +1,59 @@ +'.$ficheros.'

'."\n"; +} +?> + + + + + Administración web de aulas + + + + + + + + + + + +

*

+

 

+

 

+

 

+

 

+

OpenGnsys

+ +
+ + + + + +
+ Tu navegador no soporta frames!!'; ?> +
-- cgit v1.2.3-18-g5258 From 1be256fc1dbd5f29257fe0863d2811f1a646c9f7 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Thu, 11 Oct 2018 09:27:08 +0000 Subject: #846 Se configura logrotate para que incluya todos los archivos de registro. Se separan los servicios del server y del repo en archivos independientes --- installer/opengnsys_installer.sh | 7 +++++-- repoman/etc/logrotate.tmpl | 22 ++++++++++++++++++++++ server/etc/logrotate.tmpl | 30 +++++++++++++----------------- 3 files changed, 40 insertions(+), 19 deletions(-) create mode 100644 repoman/etc/logrotate.tmpl diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 230458ec..2166a1c7 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -1485,9 +1485,12 @@ function openGnsysConfigure() echo "* * * * * root [ -x $INSTALL_TARGET/bin/deletepreimage ] && $INSTALL_TARGET/bin/deletepreimage" > /etc/cron.d/imagedelete echo "* * * * * root [ -x $INSTALL_TARGET/bin/ogagentqueue.cron ] && $INSTALL_TARGET/bin/ogagentqueue.cron" > /etc/cron.d/ogagentqueue - echoAndLog "${FUNCNAME}(): Creating logrotate configuration file." + echoAndLog "${FUNCNAME}(): Creating logrotate configuration files." sed -e "s/OPENGNSYSDIR/${INSTALL_TARGET//\//\\/}/g" \ - $WORKDIR/opengnsys/server/etc/logrotate.tmpl > /etc/logrotate.d/opengnsys + $WORKDIR/opengnsys/server/etc/logrotate.tmpl > /etc/logrotate.d/opengnsysServer + + sed -e "s/OPENGNSYSDIR/${INSTALL_TARGET//\//\\/}/g" \ + $WORKDIR/opengnsys/repoman/etc/logrotate.tmpl > /etc/logrotate.d/opengnsysRepo echoAndLog "${FUNCNAME}(): Creating OpenGnsys config files." for dev in ${DEVICE[*]}; do diff --git a/repoman/etc/logrotate.tmpl b/repoman/etc/logrotate.tmpl new file mode 100644 index 00000000..f2dfcf4b --- /dev/null +++ b/repoman/etc/logrotate.tmpl @@ -0,0 +1,22 @@ +# Configuración de logrotate para el servidor de repositorio de OpenGnsys +# Los archivos se copian y luego se corta el original, para que los equipos puedan seguir escribiendo sobre ellos +# Las copias se comprimen +# Los registros de las transferencias multicast se guardan una semana (repo). +# El resto de los registros se comprueban diariamente que no excedan 100k. Se mantienen los últimos 5. +# Con esta condición de los servicios ogAdmServer y ogAdmRepo conservan datos de más de un mes. + +copytruncate +compress + +prerotate + find /opt/opengnsys/log/mcastlog -type f -mtime +7 -exec rm -f {} \; +endscript + +/opt/opengnsys/log/bttrack.log +/opt/opengnsys/log/torrent-creator.log +/opt/opengnsys/log/ogAdmRepo.log +/opt/opengnsys/log/opengnsys.log +{ + rotate 5 + size 100k +} diff --git a/server/etc/logrotate.tmpl b/server/etc/logrotate.tmpl index abe436d1..d487fcff 100644 --- a/server/etc/logrotate.tmpl +++ b/server/etc/logrotate.tmpl @@ -1,24 +1,20 @@ +# Configuración de logrotate para el servidor de administración de OpenGnsys # Los archivos se copian y luego se corta el original, para que los equipos puedan seguir escribiendo sobre ellos # Las copias se comprimen -# Clientes: se guardan 500K de cada cliente: se rotan cuando llegan a 100K y se guardan 5 -# Mcastlog: se guardan dos semanas. -# servicios opengnsys y tracker: se guardan 4 semanas - +# Los registros de las transferencias multicast se guardan una semana (repo). +# El resto de los registros se comprueban diariamente que no excedan 100k. Se mantienen los últimos 5. +# Con esta condición de los servicios ogAdmServer y ogAdmRepo conservan datos de más de un mes. copytruncate compress -OPENGNSYSDIR/log/clients/*.log { - rotate 5 - size 100k -} -OPENGNSYSDIR/log/mcastlog/ogAdmRepoMcast.*([-0-9]) { - rotate 2 - weekly +/opt/opengnsys/log/clients/*.log +/opt/opengnsys/log/ogAdmServer.log +/opt/opengnsys/log/ogagent.log +/opt/opengnsys/log/opengnsys.log +/opt/opengnsys/log/remotepc.log +/opt/opengnsys/log/rest.log +{ + rotate 5 + size 100k } - -OPENGNSYSDIR/log/bttrack.log OPENGNSYSDIR/log/ogAdmRepo.log OPENGNSYSDIR/log/ogAdmServer.log { - rotate 4 - weekly -} - -- cgit v1.2.3-18-g5258 From b50031bf0923b45ffef9445a8f1fcc704d114603 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Mon, 15 Oct 2018 10:00:52 +0200 Subject: #872: Labs tree will be collapsed after modifying computer properties; updating closed tickets list. --- admin/WebConsole/gestores/gestor_ordenadores.php | 9 +++++++++ doc/CHANGELOG.es.txt | 25 ++++++++++++++++++++---- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/admin/WebConsole/gestores/gestor_ordenadores.php b/admin/WebConsole/gestores/gestor_ordenadores.php index d2b74482..2b517abd 100644 --- a/admin/WebConsole/gestores/gestor_ordenadores.php +++ b/admin/WebConsole/gestores/gestor_ordenadores.php @@ -165,6 +165,15 @@ if($opcion!=$op_movida){ echo ' '; echo ''; } +?> + + Date: Mon, 15 Oct 2018 10:38:58 +0200 Subject: #873: New script {{{importomage}}}. --- repoman/bin/importimage | 110 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100755 repoman/bin/importimage diff --git a/repoman/bin/importimage b/repoman/bin/importimage new file mode 100755 index 00000000..36a188e4 --- /dev/null +++ b/repoman/bin/importimage @@ -0,0 +1,110 @@ +#!/bin/bash +#/** +#@file importimage +#@usage importimage [str_user] str_repo str_imagename +#@brief Imports an image file from other repository +#@param str_user username to access the remote repository (local user, by default) +#@param str_repo repository IP address or hostaname +#@param str_imagename image name to download +#@warning Program will request the repository REST token. +#@version 1.1.1 - Initial version +#@author Ramón M. Gómez, ETSII Universidad de Sevilla +#@date 2017-10-08 +#*/ + + +# Variables. +PROG="$(basename "$0")" +OPENGNSYS="/opt/opengnsys" +REPODIR="$OPENGNSYS/images" +SERVERCONF="$OPENGNSYS/etc/ogAdmServer.cfg" +let BACKUP=0 + +# Functions. +source $OPENGNSYS/lib/ogfunctions.sh + + +# Main program. + +# Error control. +[ "$USER" = "root" ] || raiseError access "Need to be root." +[ -w $REPODIR ] || raiseError access "Cannot write in local repository." +case $# in + 2) USERNAME="$SUDO_USER"; REPO="$1"; IMAGE="$2" ;; + 3) USERNAME="$1"; REPO="$2"; IMAGE="$3" ;; + *) [ "$*" == "help" ] && help || raiseError usage +esac +source $SERVERCONF &>/dev/null +[ "${REPO,,}" == "${HOSTNAME,,}" -o "${REPO,,}" == "localhost" -o "${REPO}" == "127.0.0.1" -o "${REPO,,}" == "${IPLocal,,}}" ] && raiseError access "Cannot import from local repository." + +# Fetching image info from the repository. +read -rp "Enter repository API token: " APITOKEN +IMAGEINFO="$(curl -k -H "Authorization: $APITOKEN" "https://$REPO/opengnsys/rest/repository/image/$IMAGE" 2> /dev/null | jq -r .)" +IMAGENAME="$(jq -r '.name' <<< "$IMAGEINFO" 2>/dev/null)" +case "$IMAGEINFO" in + "") # Connection error. + raiseError access "Cannot connect to $REPO" ;; + "[]") # Image not found. + raiseError notfound "Image $IMAGE in remote repository $REPO" ;; + *) # Checking REST error. + MESSAGE="$(jq -r '.message' <<< "$IMAGEINFO" 2>/dev/null)" + [ -n "$MESSAGE" ] && raiseError access "$MESSAGE" +esac +IMAGETYPE="$(jq -r '.type' <<< "$IMAGEINFO" 2>/dev/null)" +IMAGELOCKED="$(jq -r '.locked' <<< "$IMAGEINFO" 2>/dev/null)" +[ "$IMAGELOCKED" == "true" ] && raiseError access "Image locked by remote repository." +IMAGESIZE="$(jq -r '.size' <<< "$IMAGEINFO" 2>/dev/null)" +[ -z "$IMAGESIZE" ] && raiseError access "Cannot retrieve image size" +# Checking if local image is locked. +LOCKFILE="$IMAGEPATH.lock" +[ -f "$LOCKFILE" ] && raiseError access "Local image is locked, cannot write." +# Checking if local image exists. +IMAGEPATH="$REPODIR/$IMAGENAME.$IMAGETYPE" +if [ -e "$IMAGEPATH" ]; then + read -rp "Image $IMAGENAME exists in the local repository. Do you want to continue? (y/N): " ANSWER + [ "${ANSWER,,}" = "y" ] || exit + BACKUP=1 + REMOTEDATE=$(jq -r '.modified' <<< "$IMAGEINFO" 2>/dev/null) + LOCALDATE=$(stat -c "%y" "$IMAGEPATH" | cut -f1 -d.) + if [[ "$REMOTEDATE" < "$LOCALDATE" ]]; then + read -rp "Remote image seems older than the local one. Do you want to continue? (y/N): " ANSWER + [ "${ANSWER,,}" = "y" ] || exit + fi +fi + +# Trapping signal to unlock image before exit. +trap "rm -f $LOCKFILE" 1 2 3 6 9 15 +# Creating lock file. +touch $LOCKFILE +# Backing up local image. +if [ $BACKUP -eq 1 ]; then + mv -vf "$IMAGEPATH" "$IMAGEPATH.ant" 2>/dev/null + mv -vf "$IMAGEPATH.torrent" "$IMAGEPATH.torrent.ant" 2>/dev/null + mv -vf "$IMAGEPATH.sum" "$IMAGEPATH.sum.ant" 2>/dev/null + mv -vf "$IMAGEPATH.full.sum" "$IMAGEPATH.full.sum.ant" 2>/dev/null +fi +# Downloading image file. +[[ $IMAGEPATH =~ / ]] && mkdir -p "$(dirname "$IMAGEPATH")" +scp $USERNAME@$REPO:$IMAGEPATH $REPODIR +ERRCODE=$? +if [ $ERRCODE -eq 0 ]; then + # Storing creation info. + jq -r '.clonator+":"+.compressor+":"+.filesystem+":"+(.datasize|tostring)+":"' <<<"$IMAGEINFO" > "$IMAGEPATH.info" + #### Si no es backup de imagen y es repo con server, + #### crear objeto imagen asociado a nuevo perfil de software vacío. + DOWNLOADSIZE=$(stat -c "%s" $IMAGEPATH) + [ $IMAGESIZE -ne $DOWNLOADSIZE ] && echo "Warning: image sizes differ: source=$IMAGESIZE, target=$DOWNLOADSIZE." +else + raiseError download "$USERNAME@$REPO:$IMAGEPATH" + # Recovering back up, if needed. + if [ $BACKUP -eq 1 ]; then + mv -vf "$IMAGEPATH.ant" "$IMAGEPATH" 2>/dev/null + mv -vf "$IMAGEPATH.torrent.ant" "$IMAGEPATH.torrent" 2>/dev/null + mv -vf "$IMAGEPATH.sum.ant" "$IMAGEPATH.sum" 2>/dev/null + mv -vf "$IMAGEPATH.full.sum.ant" "$IMAGEPATH.full.sum" 2>/dev/null + fi +fi + +# Unlocking image. +rm -f $LOCKFILE + -- cgit v1.2.3-18-g5258 From fbc73330cd32f55c406b9f3453329bd488209667 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Tue, 16 Oct 2018 10:20:16 +0200 Subject: #846: Update script creates logrotate files if they do not exist. --- doc/CHANGELOG.es.txt | 24 ++++++++++++++---------- installer/opengnsys_update.sh | 16 +++++++++++++++- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/doc/CHANGELOG.es.txt b/doc/CHANGELOG.es.txt index a4808b77..99486fa6 100644 --- a/doc/CHANGELOG.es.txt +++ b/doc/CHANGELOG.es.txt @@ -37,7 +37,10 @@ Tickets resueltos en módulo OpenGnsys Client: #852 Apagado del cliente si tiempo de espera cambia de día Tickets resueltos en módulo OpenGnsys Server: -#846 Configuración de logrotate para que incluya todos los servicios de OpenGnsys +#846 Configuración de logrotate para que incluya todos los servicios de OpenGnsys + +Tickets resueltos en módulo OpenGnsys Repository Server: +#850 Problema con repositorio recién instalado Tickets resueltos en módulo OpenGnsys Web Admin Console: #835 Problemas al listar plantillas en Nerboot Avanzado @@ -45,6 +48,7 @@ Tickets resueltos en módulo OpenGnsys Web Admin Console: Tickets genéricos resueltos: #839 Errores detectado en API REST para Remote PC #840 Usar Git como repositorio de código +#865 Problemas con Trac #872 Liberar versión de mantenimiento OpenGnsys 1.1.0a @@ -59,7 +63,7 @@ Tickets resueltos en módulo OpenGnsys Cloning Engine: #678 Unidades organizativas con directorio de imágenes separado (mejora) #716 Revisión ogCleanLinuxDevices #722 Multicast entre subredes (mejora) -#726 Reducir el registro de errores y avisos en algunas operaciones +#726 Reducir el registro de errores y avisos en algunas operaciones #727 ogGrubHidePartitions comprueba tipo de partición con blkid en vez revisar las entradas del Grub #731 Soporte para cualquier versión de Windows #740 Clonar disco completo en modo "raw" @@ -106,8 +110,8 @@ Tickets resueltos en módulo OpenGnsys Repository Server: #379 Usar identificador de operación para el ogAdmRepoAux (no se resolverá) #701 torrent-creator falla si el fichero de imagen a procesar no es válido #743 Funcion en el webservice API REST para wakeonlan (mejora) -#810 API REST de respositorio para listado de imágenes -#820 checkperms da error al cambiar permisos sobre el directorio de agrupamiento de imágenes en el repo +#810 API REST de respositorio para listado de imágenes +#820 checkperms da error al cambiar permisos sobre el directorio de agrupamiento de imágenes en el repo Tickets resueltos en módulo OpenGnsys Web Admin Console: #372 Comandos y asistentes deberían limitar equipos de operación dentro de ámbito @@ -127,18 +131,18 @@ Tickets resueltos en módulo OpenGnsys Web Admin Console: #778 Codificar claves de usuarios (mejora) #779 Crear comando "Enviar mensaje" #782 Crear registro de acciones para realizar informes -#789 Actualizar plantilla PXE al mover ordenador +#789 Actualizar plantilla PXE al mover ordenador #792 Incluir en los html personalizados de ejemplo los enlaces al acceso privado #797 Revisar log en los procesos de restauración #798 Mostrar imágenes en orden alfabético -#799 Consola web: estado de los equipos tarda en mostar +#799 Consola web: estado de los equipos tarda en mostar #806 Comando Particionar y Formatear: controlar que no se exceda el tamaño del disco #807 Consola Web: Incorporar ordenadores da error de time-out #814 Sustituir las etiquetas cortas de php por el formato largo #817 Correcciones al formulario propiedades del aula -#818 Actualización ficheros PXE tras modificar propiedad de IP del repositorio -#819 Eliminar un objeto ordenador no elimina fichero PXE -#821 Comando Particionar sólo funciona correctamente en al ámbito de tipo ordenador +#818 Actualización ficheros PXE tras modificar propiedad de IP del repositorio +#819 Eliminar un objeto ordenador no elimina fichero PXE +#821 Comando Particionar sólo funciona correctamente en al ámbito de tipo ordenador #822 Llamar al updateBootCache desde el particionado de la cache #828 Identificador de perfil hardware disponible desde el ogLive y eliminación de winboot @@ -896,7 +900,7 @@ Tickets resueltos en módulo OpenGnSys Cloning Engine: #61 ogListPartitions muestra el tipo de sistemas de archivos de la particion y no el tipo de partición en cuestión #71 ogListPartitions falla con partición extendida #73 Mensajes de error en particiones vacías -#75 Arrancar sistemas Linux en partición distinta a la original +#75 Arrancar sistemas Linux en partición distinta a la original #85 ogCreateImage no crea los subdirectorios del path indicado #86 ogRestoreImage siempre añade a la imagen pasada como parámetro la subcadena ".img" #87 Engine no se adapta a la sintaxis Doxygen diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index 8ebd4080..89939752 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -1014,17 +1014,31 @@ function updateClient() # Comprobar permisos y ficheros. function checkFiles() { + local LOGROTATEDIR=/etc/logrotate.d + # Comprobar permisos adecuados. if [ -x $INSTALL_TARGET/bin/checkperms ]; then echoAndLog "${FUNCNAME}(): Checking permissions" OPENGNSYS_DIR="$INSTALL_TARGET" OPENGNSYS_USER="$OPENGNSYS_CLIENTUSER" APACHE_USER="$APACHE_RUN_USER" APACHE_GROUP="$APACHE_RUN_GROUP" $INSTALL_TARGET/bin/checkperms fi - # Eliminamos el fichero de estado del tracker porque es incompatible entre los distintos paquetes if [ -f /tmp/dstate ]; then echoAndLog "${FUNCNAME}(): Deleting unused files" rm -f /tmp/dstate fi + # Crear ficheros de logrotate. + if [ -d $LOGROTATEDIR ]; then + if [ ! -f $LOGROTATEDIR/opengnsysServer ]; then + echoAndLog "${FUNCNAME}(): Creating logrotate configuration file for server" + sed -e "s/OPENGNSYSDIR/${INSTALL_TARGET//\//\\/}/g" \ + $WORKDIR/opengnsys/server/etc/logrotate.tmpl > $LOGROTATEDIR/opengnsysServer + fi + if [ ! -f $LOGROTATEDIR/opengnsysRepo ]; then + echoAndLog "${FUNCNAME}(): Creating logrotate configuration file for repository" + sed -e "s/OPENGNSYSDIR/${INSTALL_TARGET//\//\\/}/g" \ + $WORKDIR/opengnsys/server/etc/logrotate.tmpl > $LOGROTATEDIR/opengnsysRepo + fi + fi } # Resumen de actualización. -- cgit v1.2.3-18-g5258 From b80226ec060d17b4cdddbc0c0176fcfca7c363d5 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Wed, 17 Oct 2018 07:44:51 +0000 Subject: #867 Acceso al manual de usuario desde la consola web. --- installer/opengnsys_installer.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 2166a1c7..78e3d34e 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -1091,6 +1091,8 @@ function installWebFiles() sed 's/clickcontextualnodo/clicksupnodo/g' $COMPATDIR/$f.php > $COMPATDIR/$f.device.php done cp -a $COMPATDIR/imagenes.device.php $COMPATDIR/imagenes.device4.php + # Acceso al manual de usuario + ln -s $INSTALL_TARGET/doc/userManual $INSTALL_TARGET/www/userManual # Cambiar permisos para ficheros especiales. chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/www/images/{fotos,iconos} chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/www/tmp/ -- cgit v1.2.3-18-g5258 From 1f75d139cf157096eb5999be4e4355b7986f7f96 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Wed, 17 Oct 2018 10:01:10 +0200 Subject: Close #871: Sectors overflow comparition is moved. --- client/engine/Disk.lib | 2 +- doc/CHANGELOG.es.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/engine/Disk.lib b/client/engine/Disk.lib index a7db9209..06744bd9 100755 --- a/client/engine/Disk.lib +++ b/client/engine/Disk.lib @@ -128,10 +128,10 @@ while [ $# -gt 0 ]; do echo "$DISK$PART : start=$START, size=$SIZE, Id=$ID" >>$tmpsfdisk # Error si se supera el nº total de sectores. START=$[START+SIZE] - [ $START -le $SECTORS ] || ogRaiseError $OG_ERR_FORMAT "$[START/2] > $[SECTORS/2]" || return $? if [ "$IOSIZE" == "4096" -a $PART -gt 4 ]; then START=$[START+2048] fi + [ $START -le $SECTORS ] || ogRaiseError $OG_ERR_FORMAT "$[START/2] > $[SECTORS/2]" || return $? PART=$[PART+1] shift done diff --git a/doc/CHANGELOG.es.txt b/doc/CHANGELOG.es.txt index 99486fa6..a5f1687f 100644 --- a/doc/CHANGELOG.es.txt +++ b/doc/CHANGELOG.es.txt @@ -12,6 +12,7 @@ iscos duros #864 FirstRunOnceWindows: scripts de ejemplo para installMiniSetup con ratón y teclado desacti vado #866 Si al restaurar usando la cache no hay espacio en la misma se finalizará la acción +#871 Error al crear particiones lógicas en discos con sectores de 4 KB Tickets resueltos en módulo OpenGnsys Client: #847 La ISO del ogLive debe de utilzar la revisión de Git y no de SVN -- cgit v1.2.3-18-g5258 From aafe8f98297e8a27d6a8231eba2b99e208eb7005 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Wed, 17 Oct 2018 13:00:12 +0200 Subject: #867: Integrating commit {{{ba1f95c}}}. --- admin/WebConsole/idiomas/php/cat/ayuda_cat.php | 7 +++++-- admin/WebConsole/idiomas/php/eng/ayuda_eng.php | 7 +++++-- admin/WebConsole/idiomas/php/esp/ayuda_esp.php | 7 +++++-- admin/WebConsole/principal/changelog.php | 2 +- admin/WebConsole/principal/engine.php | 2 +- doc/CHANGELOG.es.txt | 1 + installer/opengnsys_installer.sh | 4 ++-- installer/opengnsys_update.sh | 3 ++- 8 files changed, 22 insertions(+), 11 deletions(-) diff --git a/admin/WebConsole/idiomas/php/cat/ayuda_cat.php b/admin/WebConsole/idiomas/php/cat/ayuda_cat.php index df74829d..5a861424 100644 --- a/admin/WebConsole/idiomas/php/cat/ayuda_cat.php +++ b/admin/WebConsole/idiomas/php/cat/ayuda_cat.php @@ -1,8 +1,8 @@ $COMPATDIR/$f.device.php done cp -a $COMPATDIR/imagenes.device.php $COMPATDIR/imagenes.device4.php - # Acceso al manual de usuario - ln -s $INSTALL_TARGET/doc/userManual $INSTALL_TARGET/www/userManual + # Acceso al manual de usuario + ln -fs ../doc/userManual $INSTALL_TARGET/www/userManual # Cambiar permisos para ficheros especiales. chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/www/images/{fotos,iconos} chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/www/tmp/ diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index 89939752..d30c626a 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -643,7 +643,8 @@ function updateWebFiles() sed 's/clickcontextualnodo/clicksupnodo/g' $COMPATDIR/$f.php > $COMPATDIR/$f.device.php done cp -a $COMPATDIR/imagenes.device.php $COMPATDIR/imagenes.device4.php - + # Acceso al manual de usuario + ln -fs ../doc/userManual $INSTALL_TARGET/www/userManual # Fichero de log de la API REST. touch $INSTALL_TARGET/log/{ogagent,rest,remotepc}.log chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/log/{ogagent,rest,remotepc}.log -- cgit v1.2.3-18-g5258 From 4dabcbe869e27e9ca166389731c647daa68e1649 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Thu, 18 Oct 2018 10:44:58 +0200 Subject: #870: Repository form changes: show the number of computers that are using it and convert line breaks from DOS to Linux format. --- .../propiedades/propiedades_repositorios.php | 510 ++++++++++----------- 1 file changed, 252 insertions(+), 258 deletions(-) diff --git a/admin/WebConsole/propiedades/propiedades_repositorios.php b/admin/WebConsole/propiedades/propiedades_repositorios.php index 13db2dc5..2b1de5ca 100644 --- a/admin/WebConsole/propiedades/propiedades_repositorios.php +++ b/admin/WebConsole/propiedades/propiedades_repositorios.php @@ -1,258 +1,252 @@ -directory; - $totalrepo = humanSize($result->disk->total); - $librerepo = humanSize($result->disk->free); - $ocupadorepo = humanSize($result->disk->total - $result->disk->free); - $porcentajerepo = 100 - floor(100 * $result->disk->free / $result->disk->total); - $repoOus = $result->ous; - $repoImages = $result->images; - $repoWithApi = true; - } else { - // Error de acceso a la API REST. - $repoWithApi = false; - $repoImages = null; - } -} else { - // Error de acceso a la API REST. - $repoWithApi = false; - $repoImages = null; -} - -//######################################################################### -?> - -Administración web de aulas - - - - - - - '?> - - -
-
- - - - - -


-

- - - - '; - ?> - - - - - '; - ?> - - - - '; - ?> - - - - '; - ?> - - - - '; - ?> - - - - -
   - '.$nombrerepositorio.''; - else - echo '
- -
 Ordenadores: 
   - '.$ip.''; - else - echo'
   - '.$puertorepo.''; - else - echo'
   - '.$apiKeyRepo.''; - else - echo'
   - '.$comentarios.''; - else - echo '
- - - - - - - - - - - - - - - \n"; - -echo "\n"; - foreach($repoImages as $image){ - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - } - foreach($repoOus as $ou) { - foreach($ou->images as $image) { - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo "\n"; - } - } - } - ?> - - - - - - - - -
   -    -    -    -
        
".$TbMsg['MSG_CONTENT']." $repodir
".$TbMsg['MSG_IMAGE']." (".$TbMsg['MSG_TYPE'].")".$TbMsg['MSG_SIZE']."".$TbMsg['MSG_MODIFIED']."".$TbMsg['MSG_PERMISSIONS']."
".$image->name." (".$image->type.")".humanSize($image->size)."".$image->modified."".$image->mode."
".$ou->subdir." / ".$image->name." (".$image->type.")".$image->size." bytes".$image->modified."".$image->mode."
 '.$TbMsg[15].'
'.$TbMsg[16] ?>
- - -
-
- - - -texto="SELECT repositorios.*, count(*) as numordenadores FROM repositorios - INNER JOIN ordenadores ON ordenadores.idrepositorio=repositorios.idrepositorio - WHERE repositorios.idrepositorio=".$id; -*/ - $cmd->texto="SELECT * FROM repositorios WHERE idrepositorio=$id"; - $rs=new Recordset; - $rs->Comando=&$cmd; - if (!$rs->Abrir()) return(true); // Error al abrir recordset - $rs->Primero(); - if (!$rs->EOF){ - $nombrerepositorio=$rs->campos["nombrerepositorio"]; - $ip=$rs->campos["ip"]; - $comentarios=$rs->campos["comentarios"]; - $puertorepo=$rs->campos["puertorepo"]; - $apiKeyRepo=$rs->campos["apikey"]; -// $ordenadores=$rs->campos["numordenadores"]; - } - $rs->Cerrar(); - return(true); -} -?> +directory; + $totalrepo = humanSize($result->disk->total); + $librerepo = humanSize($result->disk->free); + $ocupadorepo = humanSize($result->disk->total - $result->disk->free); + $porcentajerepo = 100 - floor(100 * $result->disk->free / $result->disk->total); + $repoOus = $result->ous; + $repoImages = $result->images; + $repoWithApi = true; + } else { + // Error de acceso a la API REST. + $repoWithApi = false; + $repoImages = null; + } +} else { + // Error de acceso a la API REST. + $repoWithApi = false; + $repoImages = null; +} + +//######################################################################### +?> + +Administración web de aulas + + + + + + + '?> + + +
+
+ + + + + +


+

+ + + + '; + ?> + + + + + '; + ?> + + + + '; + ?> + + + + '; + ?> + + + + '; + ?> + + + + +
   + '.$nombrerepositorio.''; + else + echo '
+ +
 Ordenadores: 
   + '.$ip.''; + else + echo'
   + '.$puertorepo.''; + else + echo'
   + '.$apiKeyRepo.''; + else + echo'
   + '.$comentarios.''; + else + echo '
+ + + + + + + + + + + + + + + \n"; + +echo "\n"; + foreach($repoImages as $image){ + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + } + foreach($repoOus as $ou) { + foreach($ou->images as $image) { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + } + } + } + ?> + + + + + + + + +
   +    +    +    +
        
".$TbMsg['MSG_CONTENT']." $repodir
".$TbMsg['MSG_IMAGE']." (".$TbMsg['MSG_TYPE'].")".$TbMsg['MSG_SIZE']."".$TbMsg['MSG_MODIFIED']."".$TbMsg['MSG_PERMISSIONS']."
".$image->name." (".$image->type.")".humanSize($image->size)."".$image->modified."".$image->mode."
".$ou->subdir." / ".$image->name." (".$image->type.")".$image->size." bytes".$image->modified."".$image->mode."
 '.$TbMsg[15].'
'.$TbMsg[16] ?>
+
+
+ + + +texto=<<Comando=&$cmd; + if (!$rs->Abrir()) return(true); // Error al abrir recordset + $rs->Primero(); + if (!$rs->EOF){ + $nombrerepositorio=$rs->campos["nombrerepositorio"]; + $ip=$rs->campos["ip"]; + $comentarios=$rs->campos["comentarios"]; + $puertorepo=$rs->campos["puertorepo"]; + $apiKeyRepo=$rs->campos["apikey"]; + $ordenadores=$rs->campos["numordenadores"]; + } + $rs->Cerrar(); + return(true); +} -- cgit v1.2.3-18-g5258 From 74210dfb8ef508d32dce2d81b64e463b3840cdaa Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Thu, 18 Oct 2018 09:33:28 +0000 Subject: #867 Página de ayuda: cambio estilo e índices de array de mensajes en inglés. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/WebConsole/estilos.css | 6 ++++-- admin/WebConsole/idiomas/php/cat/ayuda_cat.php | 7 ++++--- admin/WebConsole/idiomas/php/eng/ayuda_eng.php | 7 ++++--- admin/WebConsole/idiomas/php/esp/ayuda_esp.php | 8 ++++---- admin/WebConsole/principal/ayuda.php | 16 ++++++++-------- admin/WebConsole/principal/changelog.php | 2 +- admin/WebConsole/principal/engine.php | 4 ++-- admin/WebConsole/principal/manual.php | 4 ++++ 8 files changed, 31 insertions(+), 23 deletions(-) diff --git a/admin/WebConsole/estilos.css b/admin/WebConsole/estilos.css index 302d0f6a..d80d00fe 100644 --- a/admin/WebConsole/estilos.css +++ b/admin/WebConsole/estilos.css @@ -432,7 +432,9 @@ A.tabla_listados_sin:link{ FONT-WEIGHT: 300; } /* Ayuda enlaces sin subrayado */ -a.nounderline:link +.help_menu { -text-decoration:none; + text-decoration: none; + color: #6b6363; + font-weight: bold; } diff --git a/admin/WebConsole/idiomas/php/cat/ayuda_cat.php b/admin/WebConsole/idiomas/php/cat/ayuda_cat.php index 5a861424..40607de3 100644 --- a/admin/WebConsole/idiomas/php/cat/ayuda_cat.php +++ b/admin/WebConsole/idiomas/php/cat/ayuda_cat.php @@ -6,6 +6,7 @@ // __________________________________________________ // Mensajes. $TbMsg=array(); +$TbMsg["HELP_TITLE"]='Ayuda'; $TbMsg["MANUAL"]='Manual de usuario'; $TbMsg["API"]='Documentación de la API'; $TbMsg["CFG"]='Configuración de los clientes'; @@ -13,6 +14,6 @@ $TbMsg["CHANGELOG"]='Cambios en la versión:'; $TbMsg["USERMAIL"]='Lista de correos de usuarios'; $TbMsg["WEB"]='Web del proyecto: opengnsys.es'; $TbMsg["ABOUT"]='Acerca de OpenGnsys'; -$TbMsg["CHANGELOG_TITULO"]='Cambios en la versión: '; -$TbMsg["ENGINE_TITULO"]='Configuración de los clientes'; -$TbMsg["ENGINE_SUBTITULO"]='Contenido de engine.cfg'; +$TbMsg["CHANGELOG_TITLE"]='Cambios en la versión: '; +$TbMsg["ENGINE_TITLE"]='Configuración de los clientes'; +$TbMsg["ENGINE_SUBTITLE"]='Contenido de engine.cfg'; diff --git a/admin/WebConsole/idiomas/php/eng/ayuda_eng.php b/admin/WebConsole/idiomas/php/eng/ayuda_eng.php index d42c6670..f0da7af5 100644 --- a/admin/WebConsole/idiomas/php/eng/ayuda_eng.php +++ b/admin/WebConsole/idiomas/php/eng/ayuda_eng.php @@ -6,6 +6,7 @@ // __________________________________________________ // Mensajes. $TbMsg=array(); +$TbMsg["HELP_TITLE"]='Help'; $TbMsg["MANUAL"]='User Manual'; $TbMsg["API"]='API documentation'; $TbMsg["CFG"]='Client configuration'; @@ -13,6 +14,6 @@ $TbMsg["CHANGELOG"]='Changes in the version:'; $TbMsg["USERMAIL"]=' User email list'; $TbMsg["WEB"]='Web of the project: opengnsys.es'; $TbMsg["ABOUT"]='About OpenGnsys'; -$TbMsg["CHANGELOG_TITULO"]='Changes in the version: '; -$TbMsg["ENGINE_TITULO"]='Client configuration'; -$TbMsg["ENGINE_SUBTITULO"]='Content of engine.cfg'; +$TbMsg["CHANGELOG_TITLE"]='Changes in the version: '; +$TbMsg["ENGINE_TITLE"]='Client configuration'; +$TbMsg["ENGINE_SUBTITLE"]='Content of engine.cfg'; diff --git a/admin/WebConsole/idiomas/php/esp/ayuda_esp.php b/admin/WebConsole/idiomas/php/esp/ayuda_esp.php index e01932ed..b45d1da7 100644 --- a/admin/WebConsole/idiomas/php/esp/ayuda_esp.php +++ b/admin/WebConsole/idiomas/php/esp/ayuda_esp.php @@ -6,7 +6,7 @@ // __________________________________________________ // Mensajes. $TbMsg=array(); -$TbMsg["AYUDA_TITULO"]='Ayuda'; +$TbMsg["HELP_TITLE"]='Ayuda'; $TbMsg["MANUAL"]='Manual de usuario'; $TbMsg["API"]='Documentación de la API'; $TbMsg["CFG"]='Configuración de los clientes'; @@ -14,6 +14,6 @@ $TbMsg["CHANGELOG"]='Cambios en la versión:'; $TbMsg["USERMAIL"]='Lista de correos de usuarios'; $TbMsg["WEB"]='Web del proyecto: opengnsys.es'; $TbMsg["ABOUT"]='Acerca de OpenGnsys'; -$TbMsg["CHANGELOG_TITULO"]='Cambios en la versión: '; -$TbMsg["ENGINE_TITULO"]='Configuración de los clientes'; -$TbMsg["ENGINE_SUBTITULO"]='Contenido de engine.cfg'; +$TbMsg["CHANGELOG_TITLE"]='Cambios en la versión: '; +$TbMsg["ENGINE_TITLE"]='Configuración de los clientes'; +$TbMsg["ENGINE_SUBTITLE"]='Contenido de engine.cfg'; diff --git a/admin/WebConsole/principal/ayuda.php b/admin/WebConsole/principal/ayuda.php index b110c85e..b5380e5c 100644 --- a/admin/WebConsole/principal/ayuda.php +++ b/admin/WebConsole/principal/ayuda.php @@ -21,18 +21,18 @@ $version=(empty($data->project)) ? "OpenGnsys" : @$data->project.' '.@$data->ver -

  

+

  

-

-

-

+

+

+

 

-

-

-

-

+

+

+

+

diff --git a/admin/WebConsole/principal/changelog.php b/admin/WebConsole/principal/changelog.php index f466cf2f..bf829826 100644 --- a/admin/WebConsole/principal/changelog.php +++ b/admin/WebConsole/principal/changelog.php @@ -22,7 +22,7 @@ $changelog=(file_exists ($changelogfile)) ? file_get_contents($changelogfile, TR -

  
+

  

diff --git a/admin/WebConsole/principal/engine.php b/admin/WebConsole/principal/engine.php index cca505aa..55004b8d 100644 --- a/admin/WebConsole/principal/engine.php +++ b/admin/WebConsole/principal/engine.php @@ -18,8 +18,8 @@ $config=(file_exists ($cfgfile)) ? file_get_contents($cfgfile, TRUE) : "No hay a -

  
-

+

  
+

diff --git a/admin/WebConsole/principal/manual.php b/admin/WebConsole/principal/manual.php index 5bd2259f..ce9885cc 100644 --- a/admin/WebConsole/principal/manual.php +++ b/admin/WebConsole/principal/manual.php @@ -5,6 +5,8 @@ // Fecha: 2018-10-11 // Descripción : Página de indice del manual de usuario // **************************************************************************************** +include_once("../includes/ctrlacc.php"); +include_once("../idiomas/php/".$idioma."/ayuda_".$idioma.".php"); // Obtenemos nombres de los temas del manual //ruta manual usuario @@ -35,6 +37,8 @@ foreach ($fichero as $ficheros) { +

  
+ - - + + '.TomaDato($cmd,$idcentro,'repositorios',$idrepositorio,'idrepositorio','nombrerepositorio').''; - else - echo ''; + if ($opcion==$op_eliminacion) { + echo ''; + } else { + echo ''; + } ?> - + @@ -403,4 +405,3 @@ EOD; } return(false); } -?> -- cgit v1.2.3-18-g5258 From 413d6e1d36ddc380456c5970398c5b5b9d059a25 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Fri, 19 Oct 2018 13:43:22 +0200 Subject: #872: update list of closed tickets. --- doc/CHANGELOG.es.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/CHANGELOG.es.txt b/doc/CHANGELOG.es.txt index 2ef1135c..c3759f85 100644 --- a/doc/CHANGELOG.es.txt +++ b/doc/CHANGELOG.es.txt @@ -12,7 +12,6 @@ iscos duros #864 FirstRunOnceWindows: scripts de ejemplo para installMiniSetup con ratón y teclado desacti vado #866 Si al restaurar usando la cache no hay espacio en la misma se finalizará la acción -#871 Error al crear particiones lógicas en discos con sectores de 4 KB Tickets resueltos en módulo OpenGnsys Client: #847 La ISO del ogLive debe de utilzar la revisión de Git y no de SVN @@ -32,25 +31,26 @@ Lista de cambios incluidos en OpenGnsys 1.1.0a (versión de mantenimiento) ---------------------------------------------- Tickets resueltos en módulo OpenGnsys Cloning Engine: -#868 ConfiguraOs: error al desinstalar el agente de sistema operativo antiguo +#868 ConfiguraOs: error al desinstalar el agente de sistema operativo antiguo (corrección) +#871 Error al crear particiones lógicas en discos con sectores de 4 KB (corrección) Tickets resueltos en módulo OpenGnsys Client: -#852 Apagado del cliente si tiempo de espera cambia de día +#852 Apagado del cliente si tiempo de espera cambia de día (corrección) Tickets resueltos en módulo OpenGnsys Server: -#846 Configuración de logrotate para que incluya todos los servicios de OpenGnsys +#846 Configuración de logrotate para que incluya todos los servicios de OpenGnsys (corrección) Tickets resueltos en módulo OpenGnsys Repository Server: -#850 Problema con repositorio recién instalado +#850 Problema con repositorio recién instalado (corrección) Tickets resueltos en módulo OpenGnsys Web Admin Console: -#835 Problemas al listar plantillas en Nerboot Avanzado +#835 Problemas al listar plantillas en Nerboot Avanzado (corrección) #867 La ayuda en la consola incluirá más información Tickets genéricos resueltos: -#839 Errores detectado en API REST para Remote PC +#839 Errores detectado en API REST para Remote PC (corrección) #840 Usar Git como repositorio de código -#865 Problemas con Trac +#865 Problemas con Trac (corrección) #872 Liberar versión de mantenimiento OpenGnsys 1.1.0a -- cgit v1.2.3-18-g5258 From 6449e044d17663d43f5e9e085f1b8f10825ed79d Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Mon, 22 Oct 2018 11:00:50 +0200 Subject: #870: Allow creation of the PXE file if computer is not associated with a repository. --- admin/WebConsole/includes/tftputils.php | 4 ++-- admin/WebConsole/propiedades/propiedades_repositorios.php | 2 +- server/bin/setclientmode | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/WebConsole/includes/tftputils.php b/admin/WebConsole/includes/tftputils.php index e7af641f..e5050642 100644 --- a/admin/WebConsole/includes/tftputils.php +++ b/admin/WebConsole/includes/tftputils.php @@ -84,7 +84,7 @@ function createBootMode ($cmd, $bootopt, $hostid, $lang) { ordenadores.oglivedir AS oglivedir, aulas.netmask AS netmask, aulas.router AS router, aulas.ntp AS ntp, aulas.dns AS dns, aulas.proxy AS proxy, - aulas.nombreaula AS grupo, repositorios.ip AS iprepo, + aulas.nombreaula AS grupo, IFNULL(repositorios.ip, '') AS iprepo, (SELECT ipserveradm FROM entornos LIMIT 1) AS ipserveradm, menus.resolucion AS vga, perfileshard.descripcion AS hardprofile, centros.directorio, entidades.ogunit @@ -92,7 +92,7 @@ function createBootMode ($cmd, $bootopt, $hostid, $lang) { JOIN aulas USING (idaula) JOIN centros USING (idcentro) JOIN entidades USING (identidad) - JOIN repositorios USING (idrepositorio) + LEFT JOIN repositorios USING (idrepositorio) LEFT JOIN menus USING (idmenu) LEFT JOIN perfileshard USING (idperfilhard) WHERE ordenadores.idordenador='$hostid'"; diff --git a/admin/WebConsole/propiedades/propiedades_repositorios.php b/admin/WebConsole/propiedades/propiedades_repositorios.php index 2b1de5ca..93b73687 100644 --- a/admin/WebConsole/propiedades/propiedades_repositorios.php +++ b/admin/WebConsole/propiedades/propiedades_repositorios.php @@ -232,7 +232,7 @@ function TomaPropiedades($cmd,$id){ $cmd->texto=<< Date: Mon, 22 Oct 2018 13:48:17 +0200 Subject: #872: Code cleaning. --- admin/WebConsole/includes/tftputils.php | 3 --- admin/WebConsole/propiedades/propiedades_ordenadores.php | 4 ++-- server/bin/setclientmode | 5 +++-- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/admin/WebConsole/includes/tftputils.php b/admin/WebConsole/includes/tftputils.php index e5050642..5cf2da88 100644 --- a/admin/WebConsole/includes/tftputils.php +++ b/admin/WebConsole/includes/tftputils.php @@ -277,6 +277,3 @@ function updateBootRepo ($cmd, $repoid) { } return($errors); } - -?> - diff --git a/admin/WebConsole/propiedades/propiedades_ordenadores.php b/admin/WebConsole/propiedades/propiedades_ordenadores.php index 38e86438..887e87e0 100644 --- a/admin/WebConsole/propiedades/propiedades_ordenadores.php +++ b/admin/WebConsole/propiedades/propiedades_ordenadores.php @@ -156,7 +156,7 @@ function abrir_ventana(URL){ echo '';} if ($handle = opendir("../images/fotos")) { while (false !== ($entry = readdir($handle))) { - if ($entry != "." && $entry != "..") {?> + if ($entry != "." && $entry != "..") {?> - + diff --git a/server/bin/setclientmode b/server/bin/setclientmode index 7dadc684..855ae4a6 100755 --- a/server/bin/setclientmode +++ b/server/bin/setclientmode @@ -19,7 +19,7 @@ #@version 1.1.0 - Se incluye la unidad organizativa como parametro del kernel: ogunit=directorio_unidad (ticket #678). #@author Irina Gomez, ETSII Universidad de Sevilla #@date 2015-12-16 -#@version 1.1.1 - El server siempre es el servidor PXE. El segundo parámetro de la IP es el SERVER. La asignación del ogLive siempre es el server. (ticket #859). +#@version 1.1.0a - El server siempre es el servidor PXE. El segundo parámetro de la IP es el SERVER. La asignación del ogLive siempre es el server. (ticket #859). #@author Antonio J. Doblas Viso, Universidad de Malaga #@date 2018-07-11 #*/ ## @@ -97,7 +97,8 @@ for MAC in $ETHERNET; do DATOS=$(mysql --defaults-extra-file=$MYCNF -D "$CATALOG" -s -N -e \ "SELECT ' LANG=$LANG', ' ip=', CONCAT_WS(':', ordenadores.ip, - (SELECT (@serverip:=ipserveradm) FROM entornos LIMIT 1), aulas.router, aulas.netmask, + (SELECT (@serverip:=ipserveradm) FROM entornos LIMIT 1), + aulas.router, aulas.netmask, ordenadores.nombreordenador, ordenadores.netiface, 'none'), ' group=', REPLACE(TRIM(aulas.nombreaula), ' ', '_'), ' ogrepo=', (@repoip:=IFNULL(repositorios.ip, '')), -- cgit v1.2.3-18-g5258 From 6544149d9703be2a80826986be94a0e6af79a9e9 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Thu, 25 Oct 2018 12:55:49 +0200 Subject: #870 Incorporar ordenadores: utiliza el primer repositorio de la unidad organizativa y pide confirmación si no existe ninguno. Añadir nuevo ordenador y modificar ordenador: no exigen tener repositorio asignado. Eliminar repositorio: se corrige mensaje de aviso cuando existen ordenadores asignados. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../idiomas/javascripts/cat/avisos_cat.js | 7 +++ .../cat/propiedades_repositorios_cat.js | 2 +- .../idiomas/javascripts/eng/avisos_eng.js | 7 +++ .../eng/propiedades_repositorios_eng.js | 2 +- .../idiomas/javascripts/esp/avisos_esp.js | 7 +++ .../esp/propiedades_repositorios_esp.js | 2 +- .../propiedades/propiedades_repositorios.php | 2 +- admin/WebConsole/varios/incorporaordenadores.php | 55 ++++++++++++++++++---- 8 files changed, 71 insertions(+), 13 deletions(-) create mode 100644 admin/WebConsole/idiomas/javascripts/cat/avisos_cat.js create mode 100644 admin/WebConsole/idiomas/javascripts/eng/avisos_eng.js create mode 100644 admin/WebConsole/idiomas/javascripts/esp/avisos_esp.js diff --git a/admin/WebConsole/idiomas/javascripts/cat/avisos_cat.js b/admin/WebConsole/idiomas/javascripts/cat/avisos_cat.js new file mode 100644 index 00000000..c4f8d01d --- /dev/null +++ b/admin/WebConsole/idiomas/javascripts/cat/avisos_cat.js @@ -0,0 +1,7 @@ +//____________________________________________________________________________ +// +// Fichero de idiomas javascript: avisos_cat.js +// Idioma: Catalán +//____________________________________________________________________________ +TbMsg=new Array; +TbMsg["WARN_NOREPO"]="No hay definido repositorio en la unidad organizativa, los ordenadores se darán de alta sin repositorio."; diff --git a/admin/WebConsole/idiomas/javascripts/cat/propiedades_repositorios_cat.js b/admin/WebConsole/idiomas/javascripts/cat/propiedades_repositorios_cat.js index 547d7e6b..7cf306b3 100644 --- a/admin/WebConsole/idiomas/javascripts/cat/propiedades_repositorios_cat.js +++ b/admin/WebConsole/idiomas/javascripts/cat/propiedades_repositorios_cat.js @@ -6,6 +6,6 @@ TbMsg=new Array; TbMsg[0]="El nombre del repositorio sólo puede contener caracteres alfanuméricos"; TbMsg[1]="Debe introducir una dirección IP"; -TbMsg[2]="ATENCIÓN: Hay imágenes alojadas por este repositorio. ¿Está seguro de querer eliminarlo ?"; +TbMsg[2]="ATENCIÓN: Hay ordenadores con este repositorio asignado. ¿Está seguro de querer eliminarlo ?"; TbMsg[3]="Debe introducir un puerto de comunicaciones para los clientes"; TbMsg[4]="Los comentarios sólo pueden contener caracteres alfanuméricos"; diff --git a/admin/WebConsole/idiomas/javascripts/eng/avisos_eng.js b/admin/WebConsole/idiomas/javascripts/eng/avisos_eng.js new file mode 100644 index 00000000..3dc1c0c9 --- /dev/null +++ b/admin/WebConsole/idiomas/javascripts/eng/avisos_eng.js @@ -0,0 +1,7 @@ +//____________________________________________________________________________ +// +// Fichero de idiomas javascript: avisos_eng.js +// Idioma: Inglés +//____________________________________________________________________________ +TbMsg=new Array; +TbMsg["WARN_NOREPO"]="There is no defined repository in the organizational unit, the computers will be registered without a repository."; diff --git a/admin/WebConsole/idiomas/javascripts/eng/propiedades_repositorios_eng.js b/admin/WebConsole/idiomas/javascripts/eng/propiedades_repositorios_eng.js index 446a75f0..85dda095 100644 --- a/admin/WebConsole/idiomas/javascripts/eng/propiedades_repositorios_eng.js +++ b/admin/WebConsole/idiomas/javascripts/eng/propiedades_repositorios_eng.js @@ -6,6 +6,6 @@ TbMsg=new Array; TbMsg[0]="Repository name can only contain alphanumeric characters"; TbMsg[1]="You must enter IP address"; -TbMsg[2]="WARNING: There are some images in this repository. Do you really want to delete it?"; +TbMsg[2]="WARNING: There are computers assigned to this repository. Do you really want to delete it?"; TbMsg[3]="You must enter Comm port for clients"; TbMsg[4]="Comments can only contain alphanumeric characters."; diff --git a/admin/WebConsole/idiomas/javascripts/esp/avisos_esp.js b/admin/WebConsole/idiomas/javascripts/esp/avisos_esp.js new file mode 100644 index 00000000..9d1df6e0 --- /dev/null +++ b/admin/WebConsole/idiomas/javascripts/esp/avisos_esp.js @@ -0,0 +1,7 @@ +//____________________________________________________________________________ +// +// Fichero de idiomas javascript: avisos_esp.js +// Idioma: Español +//____________________________________________________________________________ +TbMsg=new Array; +TbMsg["WARN_NOREPO"]="No hay definido repositorio en la unidad organizativa, los ordenadores se darán de alta sin repositorio."; diff --git a/admin/WebConsole/idiomas/javascripts/esp/propiedades_repositorios_esp.js b/admin/WebConsole/idiomas/javascripts/esp/propiedades_repositorios_esp.js index 9145ffd8..8aa661dd 100644 --- a/admin/WebConsole/idiomas/javascripts/esp/propiedades_repositorios_esp.js +++ b/admin/WebConsole/idiomas/javascripts/esp/propiedades_repositorios_esp.js @@ -6,6 +6,6 @@ TbMsg=new Array; TbMsg[0]="El nombre del repositorio sólo puede contener caracteres alfanuméricos"; TbMsg[1]="Debe introducir una dirección IP"; -TbMsg[2]="ATENCIÓN: Hay imágenes alojadas por este repositorio. ¿Está seguro de querer eliminarlo ?"; +TbMsg[2]="ATENCIÓN: Hay ordenadores asignados a este repositorio. ¿Está seguro de querer eliminarlo ?"; TbMsg[3]="Debe introducir un puerto de comunicaciones para los clientes"; TbMsg[4]="Los comentarios sólo pueden contener caracteres alfanuméricos"; diff --git a/admin/WebConsole/propiedades/propiedades_repositorios.php b/admin/WebConsole/propiedades/propiedades_repositorios.php index 93b73687..87d95b0d 100644 --- a/admin/WebConsole/propiedades/propiedades_repositorios.php +++ b/admin/WebConsole/propiedades/propiedades_repositorios.php @@ -133,7 +133,7 @@ if($apiKeyRepo != ""){ '; else echo''; ?> diff --git a/admin/WebConsole/varios/incorporaordenadores.php b/admin/WebConsole/varios/incorporaordenadores.php index 103f7171..ec303ea0 100644 --- a/admin/WebConsole/varios/incorporaordenadores.php +++ b/admin/WebConsole/varios/incorporaordenadores.php @@ -7,6 +7,8 @@ // Nombre del fichero: incorporaordenadores.php // Descripción : // Da de alta en la base de datos nuevos ordenadores desde un fichero de configuración dhcp +// Version 1.1.0: Se obtiene id del repositorio de la OU. Si no existe se muestra alerta para que confirme el alta. +// Fecha: 2018-10-24 // ************************************************************************************************************************************************* include_once("../includes/ctrlacc.php"); include_once("../clases/AdoPhp.php"); @@ -34,6 +36,7 @@ if (isset($_POST["nombreaula"])) $nombreaula=$_POST["nombreaula"]; $resul=0; $ordDup=""; +$idrepositorio = idrepoOU($cmd,$idaula); if(!empty($contenido)){ // Se ha introducido contenido en lugar de fichero $resul=procesaLineas($cmd,$idaula,$contenido); @@ -41,16 +44,27 @@ if(!empty($contenido)){ // Se ha introducido contenido en lugar de fichero //___________________________________________________________________________________________________ ?> -Administración web de aulas - - + Administración web de aulas + + + + - - > - > + + + +


 

@@ -70,7 +84,7 @@ if(!empty($contenido)){ // Se ha introducido contenido en lugar de fichero - +

*

-- cgit v1.2.3-18-g5258 From 56742dbd725f91f3e6f373182cb0196c9aa02356 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Thu, 18 Oct 2018 13:08:44 +0200 Subject: #872: Solving a potential problem with downloads in some Vagrant files. --- installer/vagrant/Vagrantfile-devel-vbox | 17 +++++++++++------ installer/vagrant/Vagrantfile-prod-vbox | 17 +++++++++++------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/installer/vagrant/Vagrantfile-devel-vbox b/installer/vagrant/Vagrantfile-devel-vbox index 00d7dab6..49bc655e 100644 --- a/installer/vagrant/Vagrantfile-devel-vbox +++ b/installer/vagrant/Vagrantfile-devel-vbox @@ -38,7 +38,12 @@ if [ -z "$(blkid /dev/mapper/og-images | grep ext4)" ]; then mount -a fi # Install OpenGnsys and change server address. -curl -s https://raw.githubusercontent.com/opengnsys/OpenGnsys/devel/installer/opengnsys_installer.sh | bash || exit $? +if which curl &>/dev/null; then + DOWNLOAD="curl -s" +elif which wget &>/dev/null; then + DOWNLOAD="wget -q -O -" +fi +$DOWNLOAD -s https://raw.githubusercontent.com/opengnsys/OpenGnsys/devel/installer/opengnsys_installer.sh | bash || exit $? mv /opt/opengnsys/log/bash.log /opt/opengnsys/log/opengnsys_installer.log echo y | /opt/opengnsys/bin/setserveraddr enp0s8 # Insert DHCP data. @@ -94,12 +99,12 @@ OGAGENTPKG = "ogagent_1.1.0_all.deb" MODELSCRIPT = </dev/null; then + DOWNLOAD="curl -s" +elif which wget &>/dev/null; then + DOWNLOAD="wget -q -O -" +fi +$DOWNLOAD -s https://raw.githubusercontent.com/opengnsys/OpenGnsys/master/installer/opengnsys_installer.sh | bash || exit $? mv /opt/opengnsys/log/bash.log /opt/opengnsys/log/opengnsys_installer.log echo y | /opt/opengnsys/bin/setserveraddr enp0s8 # Insert DHCP data. @@ -73,12 +78,12 @@ OGAGENTPKG = "ogagent_1.1.0_all.deb" MODELSCRIPT = < Date: Thu, 18 Oct 2018 15:06:40 +0200 Subject: #853: Updating Doxygen configuration to resolve compatibility problems. --- installer/ogGenerateDoc.sh | 195 ++++++++++++++++++++++++++++++--------------- 1 file changed, 131 insertions(+), 64 deletions(-) diff --git a/installer/ogGenerateDoc.sh b/installer/ogGenerateDoc.sh index 62839ef2..01dbdea2 100755 --- a/installer/ogGenerateDoc.sh +++ b/installer/ogGenerateDoc.sh @@ -25,18 +25,19 @@ PROJECT=${PROJECT:-"OpenGnsys"} VERSION=$(jq '.version+" "+.codename' $(dirname "$0")/../doc/VERSION.json) 2>/dev/null VERSION=${VERSION:-"1.1.1"} cat > /tmp/doxyfile << EOF -# Doxyfile 1.5.6 -# Fichero para documentar codigo shellscripts linux. -# Proyecto OpenGnsys +# Doxyfile 1.8.13 + #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = $PROJECT PROJECT_NUMBER = $VERSION -OUTPUT_DIRECTORY = $2 +PROJECT_BRIEF = PROJECT_LOGO = $(dirname "$0")/../doc/opengnsys-logo.png +OUTPUT_DIRECTORY = $2 CREATE_SUBDIRS = NO +ALLOW_UNICODE_NAMES = NO OUTPUT_LANGUAGE = Spanish BRIEF_MEMBER_DESC = YES REPEAT_BRIEF = YES @@ -60,27 +61,36 @@ SHORT_NAMES = NO JAVADOC_AUTOBRIEF = NO QT_AUTOBRIEF = NO MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO INHERIT_DOCS = YES SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 +TAB_SIZE = 4 ALIASES = +TCL_SUBST = OPTIMIZE_OUTPUT_FOR_C = YES OPTIMIZE_OUTPUT_JAVA = NO -OPTIMIZE_FOR_FORTRAN = YES +OPTIMIZE_FOR_FORTRAN = NO OPTIMIZE_OUTPUT_VHDL = NO +EXTENSION_MAPPING = lib=c +MARKDOWN_SUPPORT = YES +TOC_INCLUDE_HEADINGS = 0 +AUTOLINK_SUPPORT = YES BUILTIN_STL_SUPPORT = NO CPP_CLI_SUPPORT = NO SIP_SUPPORT = NO IDL_PROPERTY_SUPPORT = YES DISTRIBUTE_GROUP_DOC = NO +GROUP_NESTED_COMPOUNDS = NO SUBGROUPING = YES +INLINE_GROUPED_CLASSES = NO +INLINE_SIMPLE_STRUCTS = NO TYPEDEF_HIDES_STRUCT = NO +LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- EXTRACT_ALL = YES EXTRACT_PRIVATE = YES +EXTRACT_PACKAGE = NO EXTRACT_STATIC = YES EXTRACT_LOCAL_CLASSES = YES EXTRACT_LOCAL_METHODS = NO @@ -92,12 +102,17 @@ HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO CASE_SENSE_NAMES = YES HIDE_SCOPE_NAMES = NO +HIDE_COMPOUND_REFERENCE= NO SHOW_INCLUDE_FILES = YES +SHOW_GROUPED_MEMB_INC = NO +FORCE_LOCAL_INCLUDES = NO INLINE_INFO = YES SORT_MEMBER_DOCS = YES SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO SORT_GROUP_NAMES = NO SORT_BY_SCOPE_NAME = NO +STRICT_PROTO_MATCHING = NO GENERATE_TODOLIST = YES GENERATE_TESTLIST = YES GENERATE_BUGLIST = YES @@ -105,22 +120,24 @@ GENERATE_DEPRECATEDLIST= YES ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO SHOW_FILES = YES SHOW_NAMESPACES = YES FILE_VERSION_FILTER = +LAYOUT_FILE = +CITE_BIB_FILES = #--------------------------------------------------------------------------- -# configuration options related to warning and progress messages +# Configuration options related to warning and progress messages #--------------------------------------------------------------------------- QUIET = NO WARNINGS = YES WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES WARN_NO_PARAMDOC = NO +WARN_AS_ERROR = NO WARN_FORMAT = "$file:$line: $text" WARN_LOGFILE = #--------------------------------------------------------------------------- -# configuration options related to the input files +# Configuration options related to the input files #--------------------------------------------------------------------------- INPUT = $1 INPUT_ENCODING = UTF-8 @@ -129,51 +146,45 @@ FILE_PATTERNS = *.c \ *.cxx \ *.cpp \ *.c++ \ - *.d \ *.java \ *.ii \ *.ixx \ *.ipp \ *.i++ \ *.inl \ + *.idl \ + *.ddl \ + *.odl \ *.h \ *.hh \ *.hxx \ *.hpp \ *.h++ \ - *.idl \ - *.odl \ *.cs \ + *.d \ *.php \ - *.php3 \ + *.php4 \ + *.php5 \ + *.phtml \ *.inc \ *.m \ + *.markdown \ + *.md \ *.mm \ *.dox \ *.py \ + *.pyw \ *.f90 \ + *.f95 \ + *.f03 \ + *.f08 \ *.f \ + *.for \ + *.tcl \ *.vhd \ *.vhdl \ - *.C \ - *.CC \ - *.C++ \ - *.II \ - *.I++ \ - *.H \ - *.HH \ - *.H++ \ - *.CS \ - *.PHP \ - *.PHP3 \ - *.M \ - *.MM \ - *.PY \ - *.F90 \ - *.F \ - *.VHD \ - *.VHDL \ - *.lib \ + *.ucf \ + *.qsf \ *.lib RECURSIVE = YES EXCLUDE = @@ -187,8 +198,10 @@ IMAGE_PATH = INPUT_FILTER = FILTER_PATTERNS = FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = +USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- -# configuration options related to source browsing +# Configuration options related to source browsing #--------------------------------------------------------------------------- SOURCE_BROWSER = YES INLINE_SOURCES = NO @@ -196,16 +209,19 @@ STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = YES REFERENCES_RELATION = YES REFERENCES_LINK_SOURCE = YES +SOURCE_TOOLTIPS = YES USE_HTAGS = NO VERBATIM_HEADERS = YES +CLANG_ASSISTED_PARSING = NO +CLANG_OPTIONS = #--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index +# Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO +ALPHABETICAL_INDEX = YES COLS_IN_ALPHA_INDEX = 5 IGNORE_PREFIX = #--------------------------------------------------------------------------- -# configuration options related to the HTML output +# Configuration options related to the HTML output #--------------------------------------------------------------------------- GENERATE_HTML = YES HTML_OUTPUT = html @@ -213,68 +229,112 @@ HTML_FILE_EXTENSION = .html HTML_HEADER = HTML_FOOTER = HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO +HTML_EXTRA_STYLESHEET = +HTML_EXTRA_FILES = +HTML_COLORSTYLE_HUE = 220 +HTML_COLORSTYLE_SAT = 100 +HTML_COLORSTYLE_GAMMA = 80 +HTML_TIMESTAMP = NO +HTML_DYNAMIC_SECTIONS = NO +HTML_INDEX_NUM_ENTRIES = 100 GENERATE_DOCSET = NO DOCSET_FEEDNAME = "Doxygen generated docs" DOCSET_BUNDLE_ID = org.doxygen.Project -HTML_DYNAMIC_SECTIONS = NO +DOCSET_PUBLISHER_ID = org.doxygen.Publisher +DOCSET_PUBLISHER_NAME = Publisher +GENERATE_HTMLHELP = NO CHM_FILE = HHC_LOCATION = GENERATE_CHI = NO CHM_INDEX_ENCODING = BINARY_TOC = NO TOC_EXPAND = NO +GENERATE_QHP = NO +QCH_FILE = +QHP_NAMESPACE = org.doxygen.Project +QHP_VIRTUAL_FOLDER = doc +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = +GENERATE_ECLIPSEHELP = NO +ECLIPSE_DOC_ID = org.doxygen.Project DISABLE_INDEX = NO +GENERATE_TREEVIEW = NO ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = ALL TREEVIEW_WIDTH = 250 +EXT_LINKS_IN_WINDOW = NO FORMULA_FONTSIZE = 10 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output +FORMULA_TRANSPARENT = YES +USE_MATHJAX = NO +MATHJAX_FORMAT = HTML-CSS +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest +MATHJAX_EXTENSIONS = +MATHJAX_CODEFILE = +SEARCHENGINE = YES +SERVER_BASED_SEARCH = NO +EXTERNAL_SEARCH = NO +SEARCHENGINE_URL = +SEARCHDATA_FILE = searchdata.xml +EXTERNAL_SEARCH_ID = +EXTRA_SEARCH_MAPPINGS = +#--------------------------------------------------------------------------- +# Configuration options related to the LaTeX output #--------------------------------------------------------------------------- GENERATE_LATEX = NO LATEX_OUTPUT = latex LATEX_CMD_NAME = latex MAKEINDEX_CMD_NAME = makeindex COMPACT_LATEX = NO -PAPER_TYPE = a4wide +PAPER_TYPE = a4 EXTRA_PACKAGES = LATEX_HEADER = +LATEX_FOOTER = +LATEX_EXTRA_STYLESHEET = +LATEX_EXTRA_FILES = PDF_HYPERLINKS = YES USE_PDFLATEX = YES LATEX_BATCHMODE = NO LATEX_HIDE_INDICES = NO +LATEX_SOURCE_CODE = NO +LATEX_BIB_STYLE = plain +LATEX_TIMESTAMP = NO #--------------------------------------------------------------------------- -# configuration options related to the RTF output +# Configuration options related to the RTF output #--------------------------------------------------------------------------- GENERATE_RTF = NO RTF_OUTPUT = rtf -COMPACT_RTF = YES -RTF_HYPERLINKS = YES +COMPACT_RTF = NO +RTF_HYPERLINKS = NO RTF_STYLESHEET_FILE = RTF_EXTENSIONS_FILE = +RTF_SOURCE_CODE = NO #--------------------------------------------------------------------------- -# configuration options related to the man page output +# Configuration options related to the man page output #--------------------------------------------------------------------------- GENERATE_MAN = NO MAN_OUTPUT = man MAN_EXTENSION = .3 -MAN_LINKS = YES +MAN_SUBDIR = +MAN_LINKS = NO #--------------------------------------------------------------------------- -# configuration options related to the XML output +# Configuration options related to the XML output #--------------------------------------------------------------------------- GENERATE_XML = NO XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output +# Configuration options related to the DOCBOOK output +#--------------------------------------------------------------------------- +GENERATE_DOCBOOK = NO +DOCBOOK_OUTPUT = docbook +DOCBOOK_PROGRAMLISTING = NO +#--------------------------------------------------------------------------- +# Configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- -# configuration options related to the Perl module output +# Configuration options related to the Perl module output #--------------------------------------------------------------------------- GENERATE_PERLMOD = NO PERLMOD_LATEX = NO @@ -284,7 +344,7 @@ PERLMOD_MAKEVAR_PREFIX = # Configuration options related to the preprocessor #--------------------------------------------------------------------------- ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = YES +MACRO_EXPANSION = NO EXPAND_ONLY_PREDEF = NO SEARCH_INCLUDES = YES INCLUDE_PATH = @@ -293,26 +353,31 @@ PREDEFINED = EXPAND_AS_DEFINED = SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration options related to external references #--------------------------------------------------------------------------- TAGFILES = GENERATE_TAGFILE = ALLEXTERNALS = NO EXTERNAL_GROUPS = YES +EXTERNAL_PAGES = YES PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- -CLASS_DIAGRAMS = NO +CLASS_DIAGRAMS = YES MSCGEN_PATH = +DIA_PATH = HIDE_UNDOC_RELATIONS = YES HAVE_DOT = YES +DOT_NUM_THREADS = 0 DOT_FONTNAME = FreeSans +DOT_FONTSIZE = 10 DOT_FONTPATH = CLASS_GRAPH = YES COLLABORATION_GRAPH = YES GROUP_GRAPHS = YES UML_LOOK = NO +UML_LIMIT_NUM_FIELDS = 10 TEMPLATE_RELATIONS = NO INCLUDE_GRAPH = YES INCLUDED_BY_GRAPH = YES @@ -321,18 +386,20 @@ CALLER_GRAPH = NO GRAPHICAL_HIERARCHY = YES DIRECTORY_GRAPH = YES DOT_IMAGE_FORMAT = png +INTERACTIVE_SVG = NO DOT_PATH = DOTFILE_DIRS = -DOT_GRAPH_MAX_NODES = 20 -MAX_DOT_GRAPH_DEPTH = 2 -DOT_TRANSPARENT = YES +MSCFILE_DIRS = +DIAFILE_DIRS = +PLANTUML_JAR_PATH = +PLANTUML_CFG_FILE = +PLANTUML_INCLUDE_PATH = +DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO DOT_MULTI_TARGETS = NO GENERATE_LEGEND = YES DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO EOF doxygen /tmp/doxyfile -- cgit v1.2.3-18-g5258 From 28cdb75b932df01ed5eeb3ea3f27a134b00ee864 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Fri, 19 Oct 2018 12:52:34 +0200 Subject: #870: Add warning if computer has no repository assigned to it. --- .../php/cat/propiedades_ordenadores_cat.php | 24 ++++++++++------------ .../php/eng/propiedades_ordenadores_eng.php | 4 ++-- .../php/esp/propiedades_ordenadores_esp.php | 6 ++---- .../propiedades/propiedades_ordenadores.php | 17 +++++++-------- 4 files changed, 24 insertions(+), 27 deletions(-) diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_ordenadores_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_ordenadores_cat.php index bd8181ed..d4e1a97b 100644 --- a/admin/WebConsole/idiomas/php/cat/propiedades_ordenadores_cat.php +++ b/admin/WebConsole/idiomas/php/cat/propiedades_ordenadores_cat.php @@ -2,22 +2,22 @@ //____________________________________________________________ // // Fitxer d'idiomes php: propiedades_ordenadores_cat.php -// Idioma: Catal� +// Idioma: Català //____________________________________________________________ if (empty ($TbMsg)) $TbMsg=array(); -$TbMsg[0]="Sense Opci�"; +$TbMsg[0]="Sense Opció"; $TbMsg[1]="Afegir"; $TbMsg[2]="Modificar"; $TbMsg[3]="Eliminar"; -$TbMsg[4]="Gesti� Ordinadors"; +$TbMsg[4]="Gestió Ordinadors"; $TbMsg[5]="Nom"; -$TbMsg[6]="Direcci� IP"; -$TbMsg[7]="Direcci� MAC"; +$TbMsg[6]="Direcció IP"; +$TbMsg[7]="Direcció MAC"; $TbMsg[8]="Perfil Hardware"; $TbMsg[9]="Autoexec"; $TbMsg[10]="Repositori"; -$TbMsg[11]="Men�"; -$TbMsg[12]="Grand�ria Cach�"; +$TbMsg[11]="Menú"; +$TbMsg[12]="Grandéria Caché"; $TbMsg[13]="Interficie de Xarxa"; $TbMsg[14]="Driver de Xarxa"; // AGP @@ -25,13 +25,11 @@ $TbMsg[18]="ogLive"; $TbMsg[509]="Foto ordinador"; $TbMsg[5091]="Afegir foto"; $TbMsg[5092]="Veure fotos"; -$TbMsg[495]="Data/Cach�"; -$TbMsg[4951]="Cach� lliure"; +$TbMsg[495]="Data/Caché"; +$TbMsg[4951]="Caché lliure"; // AGP +$TbMsg['COMM_DEFOGLIVE']="Assignat per l'administrador"; $TbMsg["PROP_SERIALNO"]="Nº de serie"; +$TbMsg["WARN_NOTREPO"]="AVISO: sin repositorio asignado."; $TbMsg["WARN_NOTDETECTED"]="(no detectado)"; -$TbMsg['COMM_DEFOGLIVE']="Assignat per l'administrador"; -// Ticket-816 PCprofesor $TbMsg['WARN_PROFESSOR']="profesor"; -?> - diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_ordenadores_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_ordenadores_eng.php index aec63524..0a18d8a4 100644 --- a/admin/WebConsole/idiomas/php/eng/propiedades_ordenadores_eng.php +++ b/admin/WebConsole/idiomas/php/eng/propiedades_ordenadores_eng.php @@ -27,8 +27,8 @@ $TbMsg[5092]="View pictures"; $TbMsg[495]="Content Cache"; $TbMsg[4951]="Cache Free"; // AGP +$TbMsg['COMM_DEFOGLIVE']="Assigned by administrator"; $TbMsg["PROP_SERIALNO"]="Serial No."; +$TbMsg["WARN_NOREPO"]="WARNING: no repository assigned."; $TbMsg["WARN_NOTDETECTED"]="(not detected)"; -$TbMsg['COMM_DEFOGLIVE']="Assigned by administrator"; -// Ticket-816 PCprofesor $TbMsg['WARN_PROFESSOR']="teacher"; diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_ordenadores_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_ordenadores_esp.php index 98f1fc91..be2bbb93 100644 --- a/admin/WebConsole/idiomas/php/esp/propiedades_ordenadores_esp.php +++ b/admin/WebConsole/idiomas/php/esp/propiedades_ordenadores_esp.php @@ -33,10 +33,8 @@ $TbMsg[5092]="Ver fotos"; $TbMsg[495]="Fecha/Caché"; $TbMsg[4951]="Caché libre"; //AGP +$TbMsg['COMM_DEFOGLIVE']="Asignado por el administrador"; $TbMsg["PROP_SERIALNO"]="Nº de serie"; +$TbMsg["WARN_NOREPO"]="AVISO: sin repositorio asignado."; $TbMsg["WARN_NOTDETECTED"]="(no detectado)"; -$TbMsg['COMM_DEFOGLIVE']="Asignado por el administrador"; -// Ticket-816 PCprofesor $TbMsg['WARN_PROFESSOR']="profesor"; -?> - diff --git a/admin/WebConsole/propiedades/propiedades_ordenadores.php b/admin/WebConsole/propiedades/propiedades_ordenadores.php index 0b5442bf..38e86438 100644 --- a/admin/WebConsole/propiedades/propiedades_ordenadores.php +++ b/admin/WebConsole/propiedades/propiedades_ordenadores.php @@ -181,15 +181,17 @@ function abrir_ventana(URL){ ?>
  
   '.HTMLSELECT($cmd,$idcentro,'repositorios',$idrepositorio,'idrepositorio','nombrerepositorio',250).''.TomaDato($cmd,$idcentro,'repositorios',$idrepositorio,'idrepositorio','nombrerepositorio').''.HTMLSELECT($cmd,$idcentro,'repositorios',$idrepositorio,'idrepositorio','nombrerepositorio',250); + echo ($idrepositorio==0?$TbMsg["WARN_NOREPO"]:'').'
     '.$apiKeyRepo.''; + echo '********
CreaParametro("@grupoid",$grupoid,1); $cmd->CreaParametro("@idaula",$idaula,1); @@ -172,6 +186,7 @@ function Inserta($cmd,$idaula,$nombre,$lamac,$laip) @idrepositorio, router, netmask, @idaula, @grupoid FROM aulas WHERE idaula=".$idaula; + $resul=$cmd->Ejecutar(); // Crear fichero de arranque PXE con plantilla por defecto. @@ -184,7 +199,7 @@ function Inserta($cmd,$idaula,$nombre,$lamac,$laip) //________________________________________________________________________________________________________ // Recupera los datos de un ordenador // Parametros: -// - cmd: Una comando ya operativo (con conexión abierta) +// - cmd: Un comando ya operativo (con conexión abierta) // - ip: Dirección IP //________________________________________________________________________________________________________ function existeOrdenador($cmd,$nombre,$MAC,$IP){ @@ -200,4 +215,26 @@ function existeOrdenador($cmd,$nombre,$MAC,$IP){ else return(false); } +//________________________________________________________________________________ +// Primer repositorio asignado a la unidad organizativa +// Parametros: +// - cmd: Un comando ya operativo (con conexión abierta) +// - idaula: identificador del aula +// Salida: idrepositorio del primer repositorio de la OU o '' +//________________________________________________________________________________ +function idrepoOU($cmd,$idaula) { + $idrepositorio = ''; + $rs=new Recordset; + $cmd->texto="SELECT idrepositorio FROM repositorios ". + " INNER JOIN centros USING (idcentro) ". + " INNER JOIN aulas USING (idcentro) ". + " WHERE idaula=$idaula ORDER BY idrepositorio LIMIT 1;"; + $rs->Comando=&$cmd; + if ($rs->Abrir()) { + $rs->Primero(); + $idrepositorio = $rs->campos["idrepositorio"]; + } + $rs->Cerrar(); + return $idrepositorio; +} ?> -- cgit v1.2.3-18-g5258 From 50b2715f9fb10adb5c8cdf46961ed29a7a0501e2 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Thu, 25 Oct 2018 14:17:54 +0200 Subject: #870 You can search for computers whitout repository. --- admin/WebConsole/idiomas/php/cat/buscar_cat.php | 1 + admin/WebConsole/idiomas/php/eng/buscar_eng.php | 2 +- admin/WebConsole/idiomas/php/esp/buscar_esp.php | 1 + admin/WebConsole/varios/buscar.php | 24 +++++++++++++++++++----- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/admin/WebConsole/idiomas/php/cat/buscar_cat.php b/admin/WebConsole/idiomas/php/cat/buscar_cat.php index 08314d0c..5c7ff062 100644 --- a/admin/WebConsole/idiomas/php/cat/buscar_cat.php +++ b/admin/WebConsole/idiomas/php/cat/buscar_cat.php @@ -16,5 +16,6 @@ $TbMsg["SEARCH_DUPLICATES"]="Duplicats"; $TbMsg["SEARCH_NOMATCHES"]="No es troben resultats"; $TbMsg["SEARCH_NOVALUE"]="Ha d\'introduir un valor pel criteri de cerca"; $TbMsg["SEARCH_PROFESSOR"]="Ordenadores de profesor"; +$TbMsg["SEARCH_NOREPO"]="Ordenadores sin repositorio"; ?> diff --git a/admin/WebConsole/idiomas/php/eng/buscar_eng.php b/admin/WebConsole/idiomas/php/eng/buscar_eng.php index 8d069840..7ac01d32 100644 --- a/admin/WebConsole/idiomas/php/eng/buscar_eng.php +++ b/admin/WebConsole/idiomas/php/eng/buscar_eng.php @@ -16,4 +16,4 @@ $TbMsg["SEARCH_DUPLICATES"]="Duplicates"; $TbMsg["SEARCH_NOMATCHES"]="No matches"; $TbMsg["SEARCH_NOVALUE"]="You must enter a search criteria value."; $TbMsg["SEARCH_PROFESSOR"]="Professor's computers"; - +$TbMsg["SEARCH_NOREPO"]="Computers without repository"; diff --git a/admin/WebConsole/idiomas/php/esp/buscar_esp.php b/admin/WebConsole/idiomas/php/esp/buscar_esp.php index ec5de480..82281b92 100644 --- a/admin/WebConsole/idiomas/php/esp/buscar_esp.php +++ b/admin/WebConsole/idiomas/php/esp/buscar_esp.php @@ -16,5 +16,6 @@ $TbMsg["SEARCH_DUPLICATES"]="Duplicados"; $TbMsg["SEARCH_NOMATCHES"]="No se encuentran resultados"; $TbMsg["SEARCH_NOVALUE"]="Debe introducir un valor para el criterio de búsqueda"; $TbMsg["SEARCH_PROFESSOR"]="Ordenadores de profesor"; +$TbMsg["SEARCH_NOREPO"]="Ordenadores sin repositorio"; ?> diff --git a/admin/WebConsole/varios/buscar.php b/admin/WebConsole/varios/buscar.php index 62f27fb6..1d65b14d 100644 --- a/admin/WebConsole/varios/buscar.php +++ b/admin/WebConsole/varios/buscar.php @@ -23,7 +23,7 @@ $valor=""; # Tomar varlores de sesión. if (isset($_POST["criterio"])) $criterio=htmlspecialchars($_POST["criterio"]); if (isset($_POST["valor"])) $valor=htmlspecialchars($_POST["valor"]); -if (!empty ($valor) or $criterio == "duplic" or $criterio == "profe") { +if (!empty ($valor) or $criterio == "duplic" or $criterio == "profe" or $criterio == "norepo") { $cmd=CreaComando($cadenaconexion); if ($cmd) { $rs=new Recordset; @@ -107,6 +107,20 @@ if (!empty ($valor) or $criterio == "duplic" or $criterio == "profe") { AND aulas.idcentro='$idcentro' ORDER BY aulas.nombreaula"; break; + case "norepo": // Mostrar ordenadores sin repositorio + $cmd->texto="SELECT grupos.nombregrupo AS grupo, + aulas.nombreaula AS aula, + ordenadores.idordenador AS id, + ordenadores.nombreordenador AS nombre, + ordenadores.ip AS ip, + ordenadores.mac AS mac + FROM ordenadores + JOIN aulas ON aulas.idaula=ordenadores.idaula + LEFT JOIN grupos ON grupos.idgrupo=aulas.grupoid + AND aulas.idcentro='$idcentro' + AND idrepositorio=0 + ORDER BY aulas.nombreaula;"; + break; } $rs->Comando=&$cmd; if ($rs->Abrir()) { @@ -140,7 +154,7 @@ function confirmar(){ } //_________________________________ function comprobar_datos(){ - if (document.fdatos.valor.value=="" && document.fdatos.criterio.value!="duplic" && document.fdatos.criterio.value!="profe") { + if (document.fdatos.valor.value=="" && document.fdatos.criterio.value!="duplic" && document.fdatos.criterio.value!="profe" && document.fdatos.criterio.value!="norepo") { alert(""); document.fdatos.valor.focus(); return(false) @@ -161,14 +175,13 @@ function PulsaEnter(oEvento){ if (iAscii == 13) confirmar(); return true; } -//_________________________________

'.$TbMsg["SEARCH_NOMATCHES"].'

'; } else { @@ -200,12 +213,13 @@ if (!empty ($valor) or $criterio == "duplic" or $criterio == "profe") {
: - +
-- cgit v1.2.3-18-g5258 From ec536c6b1df165eb490ceb32b89e403870e236db Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Mon, 29 Oct 2018 12:09:23 +0100 Subject: #784: Install or update to PHP 7 on CentOS 7. --- installer/opengnsys_installer.sh | 20 +++++++--------- installer/opengnsys_update.sh | 51 +++++++++++++++++++++++++++------------- 2 files changed, 44 insertions(+), 27 deletions(-) diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 33f25af7..031fa19e 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -170,7 +170,7 @@ OSVERSION="${OSVERSION%%.*}" # Configuración según la distribución GNU/Linux (usar minúsculas). case "$OSDISTRIB" in ubuntu|debian|linuxmint) - DEPENDENCIES=( subversion apache2 php php-ldap php-fpm libapache2-mod-fastcgi mysql-server php-mysql isc-dhcp-server bittorrent tftp-hpa tftpd-hpa xinetd build-essential g++-multilib libmysqlclient-dev wget curl doxygen graphviz bittornado ctorrent samba rsync unzip netpipes debootstrap schroot squashfs-tools btrfs-tools procps arp-scan realpath php-curl gettext moreutils jq wakeonlan udpcast shim-signed grub-efi-amd64-signed ) + DEPENDENCIES=( subversion apache2 php php-ldap php-fpm mysql-server php-mysql isc-dhcp-server bittorrent tftp-hpa tftpd-hpa xinetd build-essential g++-multilib libmysqlclient-dev wget curl doxygen graphviz bittornado ctorrent samba rsync unzip netpipes debootstrap schroot squashfs-tools btrfs-tools procps arp-scan realpath php-curl gettext moreutils jq wakeonlan udpcast shim-signed grub-efi-amd64-signed ) UPDATEPKGLIST="apt-get update" INSTALLPKG="apt-get -y install --force-yes" CHECKPKG="dpkg -s \$package 2>/dev/null | grep Status | grep -qw install" @@ -207,9 +207,10 @@ case "$OSDISTRIB" in TFTPCFGDIR=/var/lib/tftpboot ;; fedora|centos) - DEPENDENCIES=( subversion httpd mod_ssl php php-ldap mysql-server mysql-devel mysql-devel.i686 php-mysql dhcp tftp-server tftp xinetd binutils gcc gcc-c++ glibc-devel glibc-devel.i686 glibc-static glibc-static.i686 libstdc++-devel.i686 make wget curl doxygen graphviz ctorrent samba samba-client rsync unzip debootstrap schroot squashfs-tools python-crypto arp-scan procps-ng gettext moreutils jq net-tools http://ftp.altlinux.org/pub/distributions/ALTLinux/5.1/branch/$(arch)/RPMS.classic/netpipes-4.2-alt1.$(arch).rpm ) + DEPENDENCIES=( subversion httpd mod_ssl php php-ldap php-fpm mysql-server mysql-devel mysql-devel.i686 php-mysql dhcp tftp-server tftp xinetd binutils gcc gcc-c++ glibc-devel glibc-devel.i686 glibc-static glibc-static.i686 libstdc++-devel.i686 make wget curl doxygen graphviz ctorrent samba samba-client rsync unzip debootstrap schroot squashfs-tools python-crypto arp-scan procps-ng gettext moreutils jq net-tools udpcast shim-x64 grub2-efi-x64 grub2-efi-x64-modules http://ftp.altlinux.org/pub/distributions/ALTLinux/5.1/branch/$(arch)/RPMS.classic/netpipes-4.2-alt1.$(arch).rpm ) + [ "$OSDISTRIB" == "centos" ] && UPDATEPKGLIST="yum update -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$OSVERSION.noarch.rpm http://rpms.remirepo.net/enterprise/remi-release-$OSVERSION.rpm" INSTALLEXTRADEPS=( 'pushd /tmp; wget -t3 http://download.bittornado.com/download/BitTornado-0.3.18.tar.gz && tar xvzf BitTornado-0.3.18.tar.gz && cd BitTornado-CVS && python setup.py install && ln -fs btlaunchmany.py /usr/bin/btlaunchmany && ln -fs bttrack.py /usr/bin/bttrack; popd' ) - INSTALLPKG="yum install -y libstdc++ libstdc++.i686" + INSTALLPKG="yum update -y libstdc++ libstdc++.i686" CHECKPKG="rpm -q --quiet \$package" SYSTEMD=$(which systemctl 2>/dev/null) if [ -n "$SYSTEMD" ]; then @@ -240,6 +241,7 @@ case "$OSDISTRIB" in INETDCFGDIR=/etc/xinetd.d MYSQLSERV=mysqld MARIADBSERV=mariadb + PHPFPMSERV=php-fpm RSYNCSERV=rsync RSYNCCFGDIR=/etc SAMBASERV=smb @@ -303,7 +305,7 @@ case "$OSDISTRIB" in add-apt-repository -y ppa:ondrej/php eval $UPDATEPKGLIST PHP7VERSION=$(apt-cache pkgnames php7 | sort | head -1) - PHPFPM="${PHP7VERSION}-fpm" + PHPFPMSERV="${PHP7VERSION}-fpm" DEPENDENCIES=( ${DEPENDENCIES[@]//php/$PHP7VERSION} ) fi # Adaptar dependencias para libmysqlclient. @@ -313,13 +315,9 @@ case "$OSDISTRIB" in ;; centos) # Postconfiguación personalizada para CentOS. # Configuración para PHP 7. - if ! yum list php7 &>/dev/null; then - if [ $OSVERSION -lt 7 ]; then - yum install -y https://mirror.webtatic.com/yum/el$OSVERSION/latest.rpm - PHP7VERSION=$(yum list -q php7\*w | awk -F. '/^php/ {p=$1} END {print p}') - DEPENDENCIES=( ${DEPENDENCIES[@]//php/$PHP5VERSION} ) - fi - fi + PHP7VERSION=$(yum list -q php7\* 2>/dev/null | awk -F. '/^php/ {print $1; exit;}') + DEPENDENCIES=( ${DEPENDENCIES[@]//php/$PHP7VERSION} ) + PHPFPMSERV="${PHP7VERSION}-fpm" # Cambios a aplicar a partir de CentOS 7. if [ $OSVERSION -ge 7 ]; then # Sustituir MySQL por MariaDB. diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index d30c626a..54af0340 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -96,7 +96,8 @@ LOG_FILE=/tmp/$(basename $OGLOGFILE) # - OSDISTRIB - distribución Linux # - DEPENDENCIES - array de dependencias que deben estar instaladas # - UPDATEPKGLIST, INSTALLPKGS, CHECKPKG - comandos para gestión de paquetes -# - APACHECFGDIR, APACHESERV, DHCPSERV, INETDCFGDIR - configuración y servicios +# - APACHECFGDIR, APACHESERV, PHPFPMSERV, DHCPSERV, INETDCFGDIR - configuración y servicios + function autoConfigure() { local service @@ -117,7 +118,7 @@ function autoConfigure() # Configuración según la distribución de Linux. if [ -f /etc/debian_version ]; then # Distribución basada en paquetes Deb. - DEPENDENCIES=( curl rsync btrfs-tools procps arp-scan realpath php-curl gettext moreutils jq wakeonlan udpcast php-fpm libapache2-mod-fastcgi ) + DEPENDENCIES=( curl rsync btrfs-tools procps arp-scan realpath php-curl gettext moreutils jq wakeonlan udpcast shim-signed grub-efi-amd64-signed php-fpm ) UPDATEPKGLIST="add-apt-repository -y ppa:ondrej/php; apt-get update" INSTALLPKGS="apt-get -y install" DELETEPKGS="apt-get -y purge" @@ -136,12 +137,13 @@ function autoConfigure() APACHEDISABLEMODS="php" APACHEUSER="www-data" APACHEGROUP="www-data" + PHPFPMSERV="php-fpm" INETDCFGDIR=/etc/xinetd.d elif [ -f /etc/redhat-release ]; then # Distribución basada en paquetes rpm. - DEPENDENCIES=( curl rsync btrfs-progs procps-ng arp-scan gettext moreutils jq net-tools ) - # En CentOS 7 instalar arp-scan de CentOS 6. - [ "$OSDISTRIB$OSVERSION" == "centos7" ] && DEPENDENCIES=( ${DEPENDENCIES[*]/arp-scan/http://dag.wieers.com/redhat/el6/en/$(arch)/dag/RPMS/arp-scan-1.9-1.el6.rf.$(arch).rpm} ) + DEPENDENCIES=( curl rsync btrfs-progs procps-ng arp-scan gettext moreutils jq net-tools udpcast shim-x64 grub2-efi-x64 grub2-efi-x64-modules ) + # Repositorios para PHP 7 en CentOS. + [ "$OSDISTRIB" == "centos" ] && UPDATEPKGLIST="yum update -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$OSVERSION.noarch.rpm http://rpms.remirepo.net/enterprise/remi-release-$OSVERSION.rpm" INSTALLPKGS="yum install -y" DELETEPKGS="yum remove -y" CHECKPKG="rpm -q --quiet \$package" @@ -158,6 +160,7 @@ function autoConfigure() fi APACHEUSER="apache" APACHEGROUP="apache" + PHPFPMSERV="php-fpm" INETDCFGDIR=/etc/xinetd.d else # Otras distribuciones. @@ -372,13 +375,24 @@ function installDependencies() if [ -f /etc/debian_version ]; then # Basado en paquetes Deb. PHP7VERSION=$(apt-cache pkgnames php7 2>/dev/null | sort | head -1) - PHP5PKGS=( $(dpkg -l |awk '$2~/^php5/ {print $2}') ) + PHPFPMSERV="${PHP7VERSION}-fpm" + PHP5PKGS=( $(dpkg -l | awk '$2~/^php5/ {print $2}') ) if [ -n "$PHP5PKGS" ]; then $DELETEPKGS ${PHP5PKGS[@]} - PHP5PKGS[0]=$PHP7VERSION + PHP5PKGS[0]="$PHP7VERSION" INSTALLDEPS=${PHP5PKGS[@]//php5*-/${PHP7VERSION}-} fi fi + if [ "$OSDISTRIB" == "centos" ]; then + PHP7VERSION=$(yum list -q php7\* 2>/dev/null | awk -F. '/^php/ {print $1; exit;}') + PHPFPMSERV="${PHP7VERSION}-fpm" + PHP5PKGS=( $(yum list installed | awk '$1~/^php/ && $2~/^5\./ {sub(/\..*$/, "", $1); print $1}') ) + if [ -n "$PHP5PKGS" ]; then + $DELETEPKGS ${PHP5PKGS[@]} + PHP5PKGS[0]="$PHP7VERSION-php" + INSTALLDEPS=${PHP5PKGS[@]//php-/${PHP7VERSION}-php} + fi + fi if [ $# = 0 ]; then echoAndLog "${FUNCNAME}(): no dependencies are needed" @@ -533,6 +547,11 @@ function apacheConfiguration () { local config template module socketfile + # Avtivar PHP-FPM. + echoAndLog "${FUNCNAME}(): configuring PHP-FPM" + service=$PHPFPMSERV + $ENABLESERVICE; $STARTSERVICE + # Activar módulos de Apache. if [ -e $APACHECFGDIR/sites-available/opengnsys.conf ]; then echoAndLog "${FUNCNAME}(): Configuring Apache modules" @@ -544,20 +563,20 @@ function apacheConfiguration () echoAndLog "${FUNCNAME}(): Configuring Apache modules" sed -i '/rewrite/s/^#//' $APACHECFGDIR/*.conf fi + # Elegir plantilla según versión de Apache. + if [ -n "$(apachectl -v | grep "2\.[0-2]")" ]; then + template=$WORKDIR/opengnsys/server/etc/apache-prev2.4.conf.tmpl > $config + else + template=$WORKDIR/opengnsys/server/etc/apache.conf.tmpl + fi + sockfile=$(find /run/php -name "php*.sock" -type s -print 2>/dev/null) # Actualizar configuración de Apache a partir de fichero de plantilla. for config in $APACHECFGDIR/{,sites-available/}opengnsys.conf; do - # Elegir plantilla según versión de Apache. - if [ -n "$(apachectl -v | grep "2\.[0-2]")" ]; then - template=$WORKDIR/opengnsys/server/etc/apache-prev2.4.conf.tmpl > $config - else - template=$WORKDIR/opengnsys/server/etc/apache.conf.tmpl - fi - sockfile=$(find /run/php -name "php*.sock" -type s -print 2>/dev/null) - sed -e "s,CONSOLEDIR,$INSTALL_TARGET/www,g; s/SOCKETFILE/$socketfile/g" $template > $config + [ -e $config ] && sed -e "s,CONSOLEDIR,$INSTALL_TARGET/www,g; s/SOCKETFILE/$socketfile/g" $template > $config done # Reiniciar Apache. - service=$APACHESERV; $STARTSERCICE + service=$APACHESERV; $STARTSERVICE # Variables de ejecución de Apache. # - APACHE_RUN_USER -- cgit v1.2.3-18-g5258 From 5f4cfdc54fa6a4762942abfb24d1acca9535c805 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Mon, 29 Oct 2018 13:21:16 +0100 Subject: #872: Update list of closed tickets; quotation correction in Vagrant files. --- doc/CHANGELOG.es.txt | 4 ++++ installer/vagrant/Vagrantfile-boottools-vbox | 6 +++--- installer/vagrant/Vagrantfile-browser-vbox | 6 +++--- installer/vagrant/Vagrantfile-devel-vbox | 6 +++--- installer/vagrant/Vagrantfile-prod-vbox | 6 +++--- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/doc/CHANGELOG.es.txt b/doc/CHANGELOG.es.txt index c3759f85..e7f7e018 100644 --- a/doc/CHANGELOG.es.txt +++ b/doc/CHANGELOG.es.txt @@ -23,6 +23,9 @@ Tickets resueltos en módulo OpenGnsys Web Admin Console: #824 Iniciar sistema restaurado (no integrado) #842 Internacionalización de la consola web +Tickets resueltos en módulo OpenGnsys Installer: +#784 Mejorar rendimiento de PHP sobre Apache + Tickets genéricos resueltos: #843 Incluir nombre de versión @@ -38,6 +41,7 @@ Tickets resueltos en módulo OpenGnsys Client: #852 Apagado del cliente si tiempo de espera cambia de día (corrección) Tickets resueltos en módulo OpenGnsys Server: +#580 Caídas de ogAdmServer y ogAdmClient por desbordamiento de cadenas (no se resolverá) #846 Configuración de logrotate para que incluya todos los servicios de OpenGnsys (corrección) Tickets resueltos en módulo OpenGnsys Repository Server: diff --git a/installer/vagrant/Vagrantfile-boottools-vbox b/installer/vagrant/Vagrantfile-boottools-vbox index 341db637..14306402 100644 --- a/installer/vagrant/Vagrantfile-boottools-vbox +++ b/installer/vagrant/Vagrantfile-boottools-vbox @@ -12,10 +12,10 @@ VMMEM = 1024 SCRIPT = < /etc/default/locale -echo "LANG=\"$LANG\"" >> /etc/environment +echo "LANG=\\\"$LANG\\\"" > /etc/default/locale +echo "LANG=\\\"$LANG\\\"" >> /etc/environment locale-gen --lang #{LANGUAGE} -sed -i "s/XKBLAYOUT=.*/XKBLAYOUT=\"${LANG%_*}\"/" /etc/default/keyboard +sed -i "s/XKBLAYOUT=.*/XKBLAYOUT=\\\"${LANG%_*}\\\"/" /etc/default/keyboard dpkg-reconfigure -fnoninteractive console-setup # Install dependencies. apt-get update -y diff --git a/installer/vagrant/Vagrantfile-browser-vbox b/installer/vagrant/Vagrantfile-browser-vbox index bc8d55d4..60db8297 100644 --- a/installer/vagrant/Vagrantfile-browser-vbox +++ b/installer/vagrant/Vagrantfile-browser-vbox @@ -13,10 +13,10 @@ VMCPUS = 2 SCRIPT = < /etc/default/locale -echo "LANG=\"$LANG\"" >> /etc/environment +echo "LANG=\\\"$LANG\\\"" > /etc/default/locale +echo "LANG=\\\"$LANG\\\"" >> /etc/environment locale-gen --lang #{LANGUAGE} -sed -i "s/XKBLAYOUT=.*/XKBLAYOUT=\"${LANG%_*}\"/" /etc/default/keyboard +sed -i "s/XKBLAYOUT=.*/XKBLAYOUT=\\\"${LANG%_*}\\\"/" /etc/default/keyboard dpkg-reconfigure -fnoninteractive console-setup # Install main dependencies. apt-get update diff --git a/installer/vagrant/Vagrantfile-devel-vbox b/installer/vagrant/Vagrantfile-devel-vbox index 49bc655e..7aac2c56 100644 --- a/installer/vagrant/Vagrantfile-devel-vbox +++ b/installer/vagrant/Vagrantfile-devel-vbox @@ -53,10 +53,10 @@ done service isc-dhcp-server restart # Set language. export LANG="#{LANGUAGE}.UTF-8" -echo "LANG=\"$LANG\"" > /etc/default/locale -echo "LANG=\"$LANG\"" >> /etc/environment +echo "LANG=\\\"$LANG\\\"" > /etc/default/locale +echo "LANG=\\\"$LANG\\\"" >> /etc/environment locale-gen --lang #{LANGUAGE} -sed -i "s/XKBLAYOUT=.*/XKBLAYOUT=\"${LANG%_*}\"/" /etc/default/keyboard +sed -i "s/XKBLAYOUT=.*/XKBLAYOUT=\\\"${LANG%_*}\\\"/" /etc/default/keyboard dpkg-reconfigure -fnoninteractive console-setup # Comment out next lines for automatic data insertion. #SQL="INSERT INTO aulas (nombreaula, idcentro, urlfoto, grupoid, ubicacion, puestos, modomul, ipmul, pormul, velmul, router, netmask, ntp, dns, proxy, modp2p, timep2p) VALUES ('Aula virtual', 1, 'aula.jpg', 0, 'Despliegue virtual con Vagrant.', 5, 2, '239.194.2.11', 9000, 70, '#{NETPREFIX}.1', '255.255.255.0', '', '', '', 'peer', 30); INSERT INTO ordenadores (nombreordenador, ip, mac, idaula, idrepositorio, idperfilhard, idmenu, idproautoexec, grupoid, router, mascara, arranque, netiface, netdriver, fotoord) VALUES" diff --git a/installer/vagrant/Vagrantfile-prod-vbox b/installer/vagrant/Vagrantfile-prod-vbox index fa6f6ded..adeccce7 100644 --- a/installer/vagrant/Vagrantfile-prod-vbox +++ b/installer/vagrant/Vagrantfile-prod-vbox @@ -53,10 +53,10 @@ done service isc-dhcp-server restart # Set language. export LANG="#{LANGUAGE}.UTF-8" -echo "LANG=\"$LANG\"" > /etc/default/locale -echo "LANG=\"$LANG\"" >> /etc/environment +echo "LANG=\\\"$LANG\\\"" > /etc/default/locale +echo "LANG=\\\"$LANG\\\"" >> /etc/environment locale-gen --lang #{LANGUAGE} -sed -i "s/XKBLAYOUT=.*/XKBLAYOUT=\"${LANG%_*}\"/" /etc/default/keyboard +sed -i "s/XKBLAYOUT=.*/XKBLAYOUT=\\\"${LANG%_*}\\\"/" /etc/default/keyboard dpkg-reconfigure -fnoninteractive console-setup # Comment out next lines for automatic data insertion. #SQL="INSERT INTO aulas (nombreaula, idcentro, urlfoto, grupoid, ubicacion, puestos, modomul, ipmul, pormul, velmul, router, netmask, ntp, dns, proxy, modp2p, timep2p) VALUES ('Aula virtual', 1, 'aula.jpg', 0, 'Despliegue virtual con Vagrant.', 5, 2, '239.194.2.11', 9000, 70, '#{NETPREFIX}.1', '255.255.255.0', '', '', '', 'peer', 30); INSERT INTO ordenadores (nombreordenador, ip, mac, idaula, idrepositorio, idperfilhard, idmenu, idproautoexec, grupoid, router, mascara, arranque, netiface, netdriver, fotoord) VALUES" -- cgit v1.2.3-18-g5258 From 7dc04cc12bc303c0e7ecc90a95968de7d1d2c4b9 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Mon, 29 Oct 2018 13:47:46 +0100 Subject: #870: Solving SQL bug from commit {{{50b2715}}}. --- admin/WebConsole/varios/buscar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/WebConsole/varios/buscar.php b/admin/WebConsole/varios/buscar.php index 1d65b14d..552e32b7 100644 --- a/admin/WebConsole/varios/buscar.php +++ b/admin/WebConsole/varios/buscar.php @@ -117,7 +117,7 @@ if (!empty ($valor) or $criterio == "duplic" or $criterio == "profe" or $criteri FROM ordenadores JOIN aulas ON aulas.idaula=ordenadores.idaula LEFT JOIN grupos ON grupos.idgrupo=aulas.grupoid - AND aulas.idcentro='$idcentro' + WHERE aulas.idcentro='$idcentro' AND idrepositorio=0 ORDER BY aulas.nombreaula;"; break; -- cgit v1.2.3-18-g5258 From 991ad531ec9aa8ebd7dfbc8984209ec5cfa58ca4 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Tue, 6 Nov 2018 11:33:07 +0100 Subject: Display warning messaje if there is no repository defined in the Organitational Unit when entering the console. --- admin/WebConsole/controlpostacceso.php | 25 ++++++++++++++++++++++++- admin/WebConsole/idiomas/php/cat/acceso_cat.php | 3 +-- admin/WebConsole/idiomas/php/eng/acceso_eng.php | 1 + admin/WebConsole/idiomas/php/esp/acceso_esp.php | 2 +- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/admin/WebConsole/controlpostacceso.php b/admin/WebConsole/controlpostacceso.php index 844f33ca..bfe70d53 100644 --- a/admin/WebConsole/controlpostacceso.php +++ b/admin/WebConsole/controlpostacceso.php @@ -168,6 +168,28 @@ if ($idc != 0) return(true); } //_______________________________________________________________________________________________________ + // Muestra mensaje de alerta si no existe repositorio en la unidad organizativa + // Parametros: + // - cmd:Una comando ya operativo (con conexión abierta) + // - idcentro: identificador de la unidad organizativa + //_______________________________________________________________________________________________________ + function alert_norepo($cmd, $idcentro,$mensaje){ + $idrepositorio = ''; + $rs=new Recordset; + $cmd->texto="SELECT idrepositorio FROM repositorios ". + " WHERE idcentro=$idcentro LIMIT 1;"; + $rs->Comando=&$cmd; + if ($rs->Abrir()) { + $rs->Primero(); + $idrepositorio = $rs->campos["idrepositorio"]; + } + $rs->Cerrar(); + if ($idrepositorio == '') { + echo 'alert("'.$mensaje.'");'; + } + return; + + } ?> @@ -183,6 +205,7 @@ if ($idc != 0) - diff --git a/admin/WebConsole/idiomas/php/cat/acceso_cat.php b/admin/WebConsole/idiomas/php/cat/acceso_cat.php index 1b29d068..747c4047 100644 --- a/admin/WebConsole/idiomas/php/cat/acceso_cat.php +++ b/admin/WebConsole/idiomas/php/cat/acceso_cat.php @@ -30,5 +30,4 @@ $TbMsg["ACCESS_ALLOWED"]='Accés permès. Esperi si us plau ...'; $TbMsg["ACCESS_ERROR"]='Error d\'acces'; $TbMsg["ACCESS_UNKNOWNERROR"]='Error desconegut'; $TbMsg["ACCESS_NOFRAMES"]='El navegador necessita suport per a "frames" per a mostrar la pàgina.'; -?> - +$TbMsg["WARN_NOREPO"]='No existe repositorio definido en la Unidad Organizativa'; diff --git a/admin/WebConsole/idiomas/php/eng/acceso_eng.php b/admin/WebConsole/idiomas/php/eng/acceso_eng.php index d50a0003..a788a712 100644 --- a/admin/WebConsole/idiomas/php/eng/acceso_eng.php +++ b/admin/WebConsole/idiomas/php/eng/acceso_eng.php @@ -30,3 +30,4 @@ $TbMsg["ACCESS_ALLOWED"]='Access allowed. Please wait ...'; $TbMsg["ACCESS_ERROR"]='Access error'; $TbMsg["ACCESS_UNKNOWNERROR"]='Unknown error'; $TbMsg["ACCESS_NOFRAMES"]='Sorry, your browser does not handle frames.'; +$TbMsg["WARN_NOREPO"]='There is no repository defined in the Organizational Unit.'; diff --git a/admin/WebConsole/idiomas/php/esp/acceso_esp.php b/admin/WebConsole/idiomas/php/esp/acceso_esp.php index e5d084f5..ece7487b 100644 --- a/admin/WebConsole/idiomas/php/esp/acceso_esp.php +++ b/admin/WebConsole/idiomas/php/esp/acceso_esp.php @@ -30,4 +30,4 @@ $TbMsg["ACCESS_ALLOWED"]='Acceso permitido. Espere por favor ...'; $TbMsg["ACCESS_ERROR"]='Error de acceso'; $TbMsg["ACCESS_UNKNOWNERROR"]='Error desconocido'; $TbMsg["ACCESS_NOFRAMES"]='El navegador necesita soporte para "frames" para mostrar la página.'; -?> +$TbMsg["WARN_NOREPO"]='No existe repositorio definido en la Unidad Organizativa.'; -- cgit v1.2.3-18-g5258 From 97b65790e6db58cf1eac9ac891d58d93c66b8f22 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Tue, 6 Nov 2018 14:10:56 +0100 Subject: Close #869: Updating package list to install on CentOS 7.x --- installer/opengnsys_installer.sh | 12 ++++++------ installer/opengnsys_update.sh | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 031fa19e..2ad18cb8 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -207,10 +207,10 @@ case "$OSDISTRIB" in TFTPCFGDIR=/var/lib/tftpboot ;; fedora|centos) - DEPENDENCIES=( subversion httpd mod_ssl php php-ldap php-fpm mysql-server mysql-devel mysql-devel.i686 php-mysql dhcp tftp-server tftp xinetd binutils gcc gcc-c++ glibc-devel glibc-devel.i686 glibc-static glibc-static.i686 libstdc++-devel.i686 make wget curl doxygen graphviz ctorrent samba samba-client rsync unzip debootstrap schroot squashfs-tools python-crypto arp-scan procps-ng gettext moreutils jq net-tools udpcast shim-x64 grub2-efi-x64 grub2-efi-x64-modules http://ftp.altlinux.org/pub/distributions/ALTLinux/5.1/branch/$(arch)/RPMS.classic/netpipes-4.2-alt1.$(arch).rpm ) - [ "$OSDISTRIB" == "centos" ] && UPDATEPKGLIST="yum update -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$OSVERSION.noarch.rpm http://rpms.remirepo.net/enterprise/remi-release-$OSVERSION.rpm" - INSTALLEXTRADEPS=( 'pushd /tmp; wget -t3 http://download.bittornado.com/download/BitTornado-0.3.18.tar.gz && tar xvzf BitTornado-0.3.18.tar.gz && cd BitTornado-CVS && python setup.py install && ln -fs btlaunchmany.py /usr/bin/btlaunchmany && ln -fs bttrack.py /usr/bin/bttrack; popd' ) - INSTALLPKG="yum update -y libstdc++ libstdc++.i686" + DEPENDENCIES=( subversion httpd mod_ssl php-ldap php-fpm mysql-server mysql-devel mysql-devel.i686 php-mysql dhcp tftp-server tftp xinetd binutils gcc gcc-c++ glibc-devel glibc-devel.i686 glibc-static glibc-static.i686 libstdc++-devel.i686 make wget curl doxygen graphviz ctorrent samba samba-client rsync unzip debootstrap schroot squashfs-tools python-crypto arp-scan procps-ng gettext moreutils jq net-tools udpcast shim-x64 grub2-efi-x64 grub2-efi-x64-modules http://ftp.altlinux.org/pub/distributions/ALTLinux/5.1/branch/$(arch)/RPMS.classic/netpipes-4.2-alt1.$(arch).rpm ) + [ "$OSDISTRIB" == "centos" ] && UPDATEPKGLIST="yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$OSVERSION.noarch.rpm http://rpms.remirepo.net/enterprise/remi-release-$OSVERSION.rpm" + INSTALLEXTRADEPS=( 'pushd /tmp; wget -t3 http://ftp.acc.umu.se/mirror/bittornado/BitTornado-0.3.18.tar.gz && tar xvzf BitTornado-0.3.18.tar.gz && cd BitTornado-CVS && python setup.py install && ln -fs btlaunchmany.py /usr/bin/btlaunchmany && ln -fs bttrack.py /usr/bin/bttrack; popd' ) + INSTALLPKG="yum install -y libstdc++ libstdc++.i686" CHECKPKG="rpm -q --quiet \$package" SYSTEMD=$(which systemctl 2>/dev/null) if [ -n "$SYSTEMD" ]; then @@ -316,8 +316,8 @@ case "$OSDISTRIB" in centos) # Postconfiguación personalizada para CentOS. # Configuración para PHP 7. PHP7VERSION=$(yum list -q php7\* 2>/dev/null | awk -F. '/^php/ {print $1; exit;}') - DEPENDENCIES=( ${DEPENDENCIES[@]//php/$PHP7VERSION} ) - PHPFPMSERV="${PHP7VERSION}-fpm" + PHPFPMSERV="${PHP7VERSION}-${PHPFPMSERV}" + DEPENDENCIES=( ${PHP7VERSION} ${DEPENDENCIES[@]//php/$PHP7VERSION-php} ) # Cambios a aplicar a partir de CentOS 7. if [ $OSVERSION -ge 7 ]; then # Sustituir MySQL por MariaDB. diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index 54af0340..7943d4e2 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -385,7 +385,7 @@ function installDependencies() fi if [ "$OSDISTRIB" == "centos" ]; then PHP7VERSION=$(yum list -q php7\* 2>/dev/null | awk -F. '/^php/ {print $1; exit;}') - PHPFPMSERV="${PHP7VERSION}-fpm" + PHPFPMSERV="${PHP7VERSION}-${PHPFPMSERV}" PHP5PKGS=( $(yum list installed | awk '$1~/^php/ && $2~/^5\./ {sub(/\..*$/, "", $1); print $1}') ) if [ -n "$PHP5PKGS" ]; then $DELETEPKGS ${PHP5PKGS[@]} -- cgit v1.2.3-18-g5258 From 131f02b463ee3a4aea6175d2359c785213421dd7 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Tue, 6 Nov 2018 14:15:12 +0100 Subject: #872: Update list of closed tickets. --- doc/CHANGELOG.es.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/CHANGELOG.es.txt b/doc/CHANGELOG.es.txt index e7f7e018..0efb51f1 100644 --- a/doc/CHANGELOG.es.txt +++ b/doc/CHANGELOG.es.txt @@ -25,6 +25,7 @@ Tickets resueltos en módulo OpenGnsys Web Admin Console: Tickets resueltos en módulo OpenGnsys Installer: #784 Mejorar rendimiento de PHP sobre Apache +#869 Compatibilidad de servidor con Ubuntu 18.04 LTS y CentOS 7.x Tickets genéricos resueltos: #843 Incluir nombre de versión @@ -41,8 +42,8 @@ Tickets resueltos en módulo OpenGnsys Client: #852 Apagado del cliente si tiempo de espera cambia de día (corrección) Tickets resueltos en módulo OpenGnsys Server: -#580 Caídas de ogAdmServer y ogAdmClient por desbordamiento de cadenas (no se resolverá) #846 Configuración de logrotate para que incluya todos los servicios de OpenGnsys (corrección) +#859 Gestor de los ficheros PXE duplicado Tickets resueltos en módulo OpenGnsys Repository Server: #850 Problema con repositorio recién instalado (corrección) @@ -50,6 +51,7 @@ Tickets resueltos en módulo OpenGnsys Repository Server: Tickets resueltos en módulo OpenGnsys Web Admin Console: #835 Problemas al listar plantillas en Nerboot Avanzado (corrección) #867 La ayuda en la consola incluirá más información +#870 Netboot avanzado no crea la plantilla de arranque si el equipo no tiene asignado un repositorio (corrección) Tickets genéricos resueltos: #839 Errores detectado en API REST para Remote PC (corrección) -- cgit v1.2.3-18-g5258 From 546b0420f45ee1ba02c9a39dbc26e051016ba729 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Thu, 8 Nov 2018 11:22:08 +0100 Subject: #870 Crear imagen: si no existe repositorio asignado al ordenador se muestra un mensaje informativo. Árbol imágenes: se muestran las de los repositorios borrados. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/WebConsole/comandos/CrearImagen.php | 46 +++++++++++++++++++--- .../idiomas/php/cat/comandos/crearimagen_cat.php | 4 +- admin/WebConsole/idiomas/php/cat/imagenes_cat.php | 2 +- .../idiomas/php/eng/comandos/crearimagen_eng.php | 1 + admin/WebConsole/idiomas/php/eng/imagenes_eng.php | 1 + .../idiomas/php/esp/comandos/crearimagen_esp.php | 4 +- admin/WebConsole/idiomas/php/esp/imagenes_esp.php | 2 +- admin/WebConsole/principal/imagenes.php | 8 ++-- 8 files changed, 54 insertions(+), 14 deletions(-) diff --git a/admin/WebConsole/comandos/CrearImagen.php b/admin/WebConsole/comandos/CrearImagen.php index 37a43128..bab18e16 100644 --- a/admin/WebConsole/comandos/CrearImagen.php +++ b/admin/WebConsole/comandos/CrearImagen.php @@ -7,6 +7,9 @@ // Nombre del fichero: CrearImagen.php // Descripción : // Implementación del comando "CrearImagen.php" +// Version 1.1.1: Si no existe repositorio asignado al ordenador se muestra un mensaje informativo (ticket-870). +// Autora: Irina Gomez, ETSII Universidad de Sevilla +// Fecha: 2018-11-08 // ************************************************************************************************************************************************* include_once("../includes/ctrlacc.php"); include_once("../clases/AdoPhp.php"); @@ -51,12 +54,21 @@ if (!$resul){ echo '

'.$TbMsg[0].' 
'; echo '   '.$TbMsg[14].': '.$textambito.','.$nombreambito.'  

'; -?> -

- - - + echo '

'."\n"; + + if (tiene_repo($idambito)) { + echo '
'."\n". + tablaConfiguracionesCrearImagen($cmd,$idambito,$idrepositorio). + '
'."\n"; + + } else { + echo ''."\n". + ' '."\n". + ' '."\n". + ' '."\n". + '
'.$TbMsg["CREATE_NOREPO"].'
'."\n"; + } ?> '; return($SelectHtml); } + +//____________________________________________________________________________________________________ +// Devuelve si tiene repositorio asignado o no (true o false) +// Param: +// - idordenador: identificador del ordenador +//____________________________________________________________________________________________________ +function tiene_repo ($idordenador) { + global $cmd; + + $idrepositorio = 0; + $rs=new Recordset; + $cmd->texto="SELECT idrepositorio from ordenadores WHERE idordenador=$idordenador"; + $rs->Comando=&$cmd; + if ($rs->Abrir()) { + $rs->Primero(); + $idrepositorio = $rs->campos["idrepositorio"]; + } + $rs->Cerrar(); + if ($idrepositorio == 0) { + return false; + } else { + return true; + } +} ?> diff --git a/admin/WebConsole/idiomas/php/cat/comandos/crearimagen_cat.php b/admin/WebConsole/idiomas/php/cat/comandos/crearimagen_cat.php index db4e1f00..624757e4 100644 --- a/admin/WebConsole/idiomas/php/cat/comandos/crearimagen_cat.php +++ b/admin/WebConsole/idiomas/php/cat/comandos/crearimagen_cat.php @@ -1,7 +1,7 @@ + $TbMsg["CREATE_NOREPO"]='
 Ordenador sin repositorio asignado. 
No se puede crear imagen.
 '; diff --git a/admin/WebConsole/idiomas/php/cat/imagenes_cat.php b/admin/WebConsole/idiomas/php/cat/imagenes_cat.php index 0cbc73d1..0cd06da4 100644 --- a/admin/WebConsole/idiomas/php/cat/imagenes_cat.php +++ b/admin/WebConsole/idiomas/php/cat/imagenes_cat.php @@ -19,4 +19,4 @@ $TbMsg[11]='"Imagenes Monoliticas"'; $TbMsg[12]='"Imagenes Basicas"'; $TbMsg[13]='"Imagenes Incrementales"'; -?> + $TbMsg["DELETEDREPO"]='Repositorio eliminado'; diff --git a/admin/WebConsole/idiomas/php/eng/comandos/crearimagen_eng.php b/admin/WebConsole/idiomas/php/eng/comandos/crearimagen_eng.php index 2daa8722..833155f1 100644 --- a/admin/WebConsole/idiomas/php/eng/comandos/crearimagen_eng.php +++ b/admin/WebConsole/idiomas/php/eng/comandos/crearimagen_eng.php @@ -21,3 +21,4 @@ $TbMsg[13]='Type'; $TbMsg[14]='Scope'; $TbMsg[15]='Computers'; + $TbMsg["CREATE_NOREPO"]='
 Computer whithout repository assigned. 
Can not create image.
 '; diff --git a/admin/WebConsole/idiomas/php/eng/imagenes_eng.php b/admin/WebConsole/idiomas/php/eng/imagenes_eng.php index 9b9a3119..d19754c2 100644 --- a/admin/WebConsole/idiomas/php/eng/imagenes_eng.php +++ b/admin/WebConsole/idiomas/php/eng/imagenes_eng.php @@ -19,3 +19,4 @@ $TbMsg[11]='"Monolithic Images"'; $TbMsg[12]='"Base Images"'; $TbMsg[13]='"Incremental Images"'; + $TbMsg["DELETEDREPO"]='Deleted Repository'; diff --git a/admin/WebConsole/idiomas/php/esp/comandos/crearimagen_esp.php b/admin/WebConsole/idiomas/php/esp/comandos/crearimagen_esp.php index 4dfbd433..8826611d 100644 --- a/admin/WebConsole/idiomas/php/esp/comandos/crearimagen_esp.php +++ b/admin/WebConsole/idiomas/php/esp/comandos/crearimagen_esp.php @@ -1,7 +1,7 @@ + $TbMsg["CREATE_NOREPO"]='
 Ordenador sin repositorio asignado. 
No se puede crear imagen.
 '; diff --git a/admin/WebConsole/idiomas/php/esp/imagenes_esp.php b/admin/WebConsole/idiomas/php/esp/imagenes_esp.php index 59dc3493..507a894a 100644 --- a/admin/WebConsole/idiomas/php/esp/imagenes_esp.php +++ b/admin/WebConsole/idiomas/php/esp/imagenes_esp.php @@ -19,4 +19,4 @@ $TbMsg[11]='"Imágenes Monolíticas"'; $TbMsg[12]='"Imágenes Básicas"'; $TbMsg[13]='"Imágenes Incrementales"'; -?> + $TbMsg["DELETEDREPO"]='Repositorio eliminado'; diff --git a/admin/WebConsole/principal/imagenes.php b/admin/WebConsole/principal/imagenes.php index 7c0a123c..4ba41ff0 100644 --- a/admin/WebConsole/principal/imagenes.php +++ b/admin/WebConsole/principal/imagenes.php @@ -230,21 +230,23 @@ function SubarbolXML_gruposimagenes($grupoid,$ambg,$litambg,$amb,$litamb,$tipo) function SubarbolXML_Imagenes($grupoid,$amb,$litamb,$tipo) { + global $TbMsg; global $cmd; global $idcentro; $cadenaXML=""; $rs=new Recordset; #### agp ### Añado la consulta el campo idrepositorio #### - $cmd->texto="SELECT DISTINCT imagenes.idimagen,imagenes.descripcion,repositorios.nombrerepositorio,repositorios.ip + $cmd->texto="SELECT DISTINCT imagenes.idimagen,imagenes.descripcion, IFNULL(repositorios.nombrerepositorio,'".$TbMsg["DELETEDREPO"]."') AS nombrerepositorio FROM imagenes "; // Para hallar el repositorio de las incrementales hay que buscar los datos de la imagen basica (en la propia tablas imágenes) if ($tipo == 3) { - $cmd->texto.=" INNER JOIN imagenes AS basica INNER JOIN repositorios + $cmd->texto.=" INNER JOIN imagenes AS basica + LEFT JOIN repositorios WHERE basica.idrepositorio=repositorios.idrepositorio AND imagenes.imagenid=basica.idimagen AND "; } else { - $cmd->texto.=" INNER JOIN repositorios USING (idrepositorio) WHERE "; + $cmd->texto.=" LEFT JOIN repositorios USING (idrepositorio) WHERE "; } $cmd->texto.=" imagenes.idcentro=".$idcentro." AND imagenes.grupoid=".$grupoid." -- cgit v1.2.3-18-g5258 From 52a1490abc5bebe5acd8294539701e0a864dacf5 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Fri, 9 Nov 2018 10:58:26 +0100 Subject: #872: Renaming some SQL files. --- admin/Database/ogAdmBD-1.0.6b-1.1.0.sql | 160 ----------------- admin/Database/ogAdmBD-1.0.6b-1.1.0a.sql | 160 +++++++++++++++++ admin/Database/ogAdmBD-1.1.0-1.1.1pre.sql | 8 - admin/Database/ogAdmBD-1.1.0a-1.1.1pre.sql | 8 + admin/Database/ogAdmBD-1.1.0pre-1.1.0.sql | 269 ----------------------------- admin/Database/ogAdmBD-1.1.0pre-1.1.0a.sql | 269 +++++++++++++++++++++++++++++ 6 files changed, 437 insertions(+), 437 deletions(-) delete mode 100644 admin/Database/ogAdmBD-1.0.6b-1.1.0.sql create mode 100644 admin/Database/ogAdmBD-1.0.6b-1.1.0a.sql delete mode 100644 admin/Database/ogAdmBD-1.1.0-1.1.1pre.sql create mode 100644 admin/Database/ogAdmBD-1.1.0a-1.1.1pre.sql delete mode 100644 admin/Database/ogAdmBD-1.1.0pre-1.1.0.sql create mode 100644 admin/Database/ogAdmBD-1.1.0pre-1.1.0a.sql diff --git a/admin/Database/ogAdmBD-1.0.6b-1.1.0.sql b/admin/Database/ogAdmBD-1.0.6b-1.1.0.sql deleted file mode 100644 index 8db4d183..00000000 --- a/admin/Database/ogAdmBD-1.0.6b-1.1.0.sql +++ /dev/null @@ -1,160 +0,0 @@ -### Fichero de actualización de la base de datos. -# OpenGnSys 1.0.6b - OpenGnsys 1.1.0 -#use ogAdmBD - -### NOTA: la configuración de MySQL solo puede modificarla el usuario "root". -# Soportar cláusuloas GROUP BY especiales para configuración de equipos. -#SET GLOBAL sql_mode = TRIM(BOTH ',' FROM REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', '')); -# Activar calendario de eventos de MySQL. -#SET GLOBAL event_scheduler = ON; - -# Nuevos tipos de particiones y de sistemas de ficheros (ticket #758). -INSERT INTO tipospar (codpar, tipopar, clonable) VALUES - (CONV('A9',16,10), 'NETBSD', 1), - (CONV('2700',16,10), 'WIN-RECOV', 1), - (CONV('8302',16,10), 'LINUX', 1), - (CONV('A504',16,10), 'FREEBSD', 1), - (CONV('A901',16,10), 'NETBSD-SWAP', 0), - (CONV('A902',16,10), 'NETBSD', 1), - (CONV('A903',16,10), 'NETBSD', 1), - (CONV('A904',16,10), 'NETBSD', 1), - (CONV('A905',16,10), 'NETBSD', 1), - (CONV('A906',16,10), 'NETBSD-RAID', 1), - (CONV('AF02',16,10), 'HFS-RAID', 1), - (CONV('FB00',16,10), 'VMFS', 1), - (CONV('FB01',16,10), 'VMFS-RESERV', 1), - (CONV('FB02',16,10), 'VMFS-KRN', 1), - (CONV('10000',16,10), 'LVM-LV', 1), - (CONV('10010',16,10), 'ZFS-VOL', 1) - ON DUPLICATE KEY UPDATE - codpar=VALUES(codpar), tipopar=VALUES(tipopar), clonable=VALUES(clonable); -INSERT INTO sistemasficheros (idsistemafichero, nemonico, descripcion) VALUES - (20, 'F2FS', 'F2FS'), - (21, 'NILFS2', 'NILFS2') - ON DUPLICATE KEY UPDATE - idsistemafichero=VALUES(idsistemafichero), nemonico=VALUES(nemonico), descripcion=VALUES(descripcion); - -# Eliminar campos sin uso (ticket #730). -# Modificar número de puestos del aula para valores hasta 32768 (ticket #747) -# Añadir campos para aulas: servidor NTP, inclusión en proyecto Remote PC y directorio de ogLive (tickets #725, #708 y #768) -ALTER TABLE aulas - DROP cuadro_x, - DROP cuadro_y, - MODIFY puestos SMALLINT DEFAULT NULL, - ADD ntp VARCHAR(30) AFTER proxy, - ADD inremotepc TINYINT DEFAULT 0, - ADD oglivedir VARCHAR(50) NOT NULL DEFAULT 'ogLive'; -# Añadir campos para nº de revisión de imágenes y su inclusión en proyecto Remote PC (tickets #737 y #708). -ALTER TABLE imagenes - ADD revision SMALLINT UNSIGNED NOT NULL DEFAULT 0 AFTER nombreca, - ADD inremotepc TINYINT DEFAULT 0; - -# Adaptar campo para codificar claves de usuarios (ticket #778), -# eliminar campo sin uso (ticket #730), -# añadir clave de acceso a la API REST (tickets #708). -ALTER TABLE usuarios - MODIFY pasguor VARCHAR(56) NOT NULL DEFAULT '', - ADD apikey VARCHAR(32) NOT NULL DEFAULT ''; -# Preparar generación de clave de acceso a la API REST para el usuario principal (ticket #708). -UPDATE usuarios - SET apikey = 'APIKEY' - WHERE idusuario = 1 AND apikey = ''; -# Codificar claves de usuarios (ticket #) -INSERT INTO usuarios (idusuario, pasguor) - SELECT idusuario, pasguor FROM usuarios - ON DUPLICATE KEY UPDATE - idusuario=VALUES(idusuario), pasguor=SHA2(VALUES(pasguor),224); - -# Añadir nº de revisión de imagen restaurada (ticket #737), -# añadir porcentaje de uso de sistema de ficheros (ticket #711), -# evitar errores "TEXT NOT NULL" y "NO_ZERO_DATE" (ticket #730). -ALTER TABLE ordenadores_particiones - MODIFY cache TEXT, - ADD revision SMALLINT UNSIGNED NOT NULL DEFAULT 0 AFTER idimagen, - ADD uso TINYINT NOT NULL DEFAULT 0; -ALTER TABLE acciones - MODIFY restrambito TEXT, - MODIFY fechahorareg DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00', - MODIFY fechahorafin DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00'; -ALTER TABLE parametros - MODIFY descripcion TEXT; -ALTER TABLE tareas - MODIFY restrambito TEXT; - -# Actualizar componentes hardware y añadir nº de serie, clave de acceso a API REST de OGAgent y directorio de ogLive (tickets #713, #718 y #768) -ALTER TABLE tipohardwares - DROP pci; -INSERT INTO tipohardwares (idtipohardware, descripcion, urlimg, nemonico) VALUES - (17, 'Chasis del Sistema', '', 'cha'), - (18, 'Controladores de almacenamiento', '../images/iconos/almacenamiento.png', 'sto'), - (19, 'Tipo de proceso de arranque', '../images/iconos/arranque.png', 'boo'); -ALTER TABLE ordenadores - ADD numserie VARCHAR(25) DEFAULT NULL AFTER nombreordenador, - ADD agentkey VARCHAR(32) DEFAULT NULL, - ADD oglivedir VARCHAR(50) NOT NULL DEFAULT 'ogLive'; - -# Directorios en repo para distintas UO (ticket #678). -ALTER TABLE entidades - ADD ogunit TINYINT(1) NOT NULL DEFAULT 0; -ALTER TABLE centros - ADD directorio VARCHAR(50) DEFAULT ''; - -# Incluir campo ID sistema operativo en el perfil de software (tickets #738 #713) -ALTER TABLE perfilessoft - ADD idnombreso SMALLINT UNSIGNED AFTER idperfilsoft; - -# Añadir campo y generar clave de acceso a la API REST del repositorio (ticket #743). -ALTER TABLE repositorios - ADD apikey VARCHAR(32) NOT NULL DEFAULT ''; -UPDATE repositorios - SET apikey = 'REPOKEY' - WHERE idrepositorio = 1 AND apikey = ''; - -# Nuevas tablas para datos del proyecto Remote PC y operaciones de OGAgent (ticket #708). -CREATE TABLE IF NOT EXISTS remotepc ( - id INT(11) NOT NULL, - reserved DATETIME DEFAULT NULL, - urllogin VARCHAR(100), - urllogout VARCHAR(100), - PRIMARY KEY (id) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS ogagent_queue ( - id INT(11) NOT NULL AUTO_INCREMENT, - clientid INT(11) NOT NULL, - exectime DATETIME DEFAULT NULL, - operation VARCHAR(25), - PRIMARY KEY (id) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8; - - -# Nuevo comando "Enviar mensaje" (ticket #779) -INSERT INTO comandos (idcomando, descripcion, pagina, gestor, funcion, urlimg, - aplicambito, visuparametros, parametros, comentarios, activo, submenu) VALUES - (16, 'Enviar mensaje', '../comandos/EnviarMensaje.php', '../comandos/gestores/gestor_Comandos.php', 'EnviarMensaje', '', - 31, 'tit;msj', 'nfn;iph;tit;msj', '', 1, '' ); -INSERT INTO parametros (idparametro, nemonico, descripcion, nomidentificador, nomtabla, nomliteral, tipopa, visual) VALUES - (39, 'tit', 'Título', '', '', '', 0, 1), - (40, 'msj', 'Contenido', '', '', '', 0, 1); - -# Crear tabla de log para la cola de acciones (ticket #782) -CREATE TABLE IF NOT EXISTS acciones_log LIKE acciones; -ALTER TABLE acciones_log ADD fecha_borrado DATETIME; -DELIMITER // -CREATE TRIGGER registrar_acciones BEFORE DELETE ON acciones FOR EACH ROW BEGIN - INSERT INTO acciones_log VALUES - (OLD.idaccion, OLD.tipoaccion, OLD.idtipoaccion, OLD.descriaccion, - OLD.idordenador, OLD.ip, OLD.sesion, OLD.idcomando, OLD.parametros, - OLD.fechahorareg, OLD.fechahorafin, OLD.estado, OLD.resultado, - OLD.descrinotificacion, OLD.ambito, OLD.idambito, OLD.restrambito, - OLD.idprocedimiento, OLD.idtarea, OLD.idcentro, OLD.idprogramacion, NOW()); -END// -DELIMITER ; - -# Ampliar programación de tareas hasta 2025 (ticket #732). -ALTER TABLE programaciones - MODIFY annos SMALLINT DEFAULT NULL, - MODIFY meses SMALLINT DEFAULT NULL; - -# Eliminar tabla sin uso (ticket #730). -DROP TABLE IF EXISTS campus; - diff --git a/admin/Database/ogAdmBD-1.0.6b-1.1.0a.sql b/admin/Database/ogAdmBD-1.0.6b-1.1.0a.sql new file mode 100644 index 00000000..8db4d183 --- /dev/null +++ b/admin/Database/ogAdmBD-1.0.6b-1.1.0a.sql @@ -0,0 +1,160 @@ +### Fichero de actualización de la base de datos. +# OpenGnSys 1.0.6b - OpenGnsys 1.1.0 +#use ogAdmBD + +### NOTA: la configuración de MySQL solo puede modificarla el usuario "root". +# Soportar cláusuloas GROUP BY especiales para configuración de equipos. +#SET GLOBAL sql_mode = TRIM(BOTH ',' FROM REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', '')); +# Activar calendario de eventos de MySQL. +#SET GLOBAL event_scheduler = ON; + +# Nuevos tipos de particiones y de sistemas de ficheros (ticket #758). +INSERT INTO tipospar (codpar, tipopar, clonable) VALUES + (CONV('A9',16,10), 'NETBSD', 1), + (CONV('2700',16,10), 'WIN-RECOV', 1), + (CONV('8302',16,10), 'LINUX', 1), + (CONV('A504',16,10), 'FREEBSD', 1), + (CONV('A901',16,10), 'NETBSD-SWAP', 0), + (CONV('A902',16,10), 'NETBSD', 1), + (CONV('A903',16,10), 'NETBSD', 1), + (CONV('A904',16,10), 'NETBSD', 1), + (CONV('A905',16,10), 'NETBSD', 1), + (CONV('A906',16,10), 'NETBSD-RAID', 1), + (CONV('AF02',16,10), 'HFS-RAID', 1), + (CONV('FB00',16,10), 'VMFS', 1), + (CONV('FB01',16,10), 'VMFS-RESERV', 1), + (CONV('FB02',16,10), 'VMFS-KRN', 1), + (CONV('10000',16,10), 'LVM-LV', 1), + (CONV('10010',16,10), 'ZFS-VOL', 1) + ON DUPLICATE KEY UPDATE + codpar=VALUES(codpar), tipopar=VALUES(tipopar), clonable=VALUES(clonable); +INSERT INTO sistemasficheros (idsistemafichero, nemonico, descripcion) VALUES + (20, 'F2FS', 'F2FS'), + (21, 'NILFS2', 'NILFS2') + ON DUPLICATE KEY UPDATE + idsistemafichero=VALUES(idsistemafichero), nemonico=VALUES(nemonico), descripcion=VALUES(descripcion); + +# Eliminar campos sin uso (ticket #730). +# Modificar número de puestos del aula para valores hasta 32768 (ticket #747) +# Añadir campos para aulas: servidor NTP, inclusión en proyecto Remote PC y directorio de ogLive (tickets #725, #708 y #768) +ALTER TABLE aulas + DROP cuadro_x, + DROP cuadro_y, + MODIFY puestos SMALLINT DEFAULT NULL, + ADD ntp VARCHAR(30) AFTER proxy, + ADD inremotepc TINYINT DEFAULT 0, + ADD oglivedir VARCHAR(50) NOT NULL DEFAULT 'ogLive'; +# Añadir campos para nº de revisión de imágenes y su inclusión en proyecto Remote PC (tickets #737 y #708). +ALTER TABLE imagenes + ADD revision SMALLINT UNSIGNED NOT NULL DEFAULT 0 AFTER nombreca, + ADD inremotepc TINYINT DEFAULT 0; + +# Adaptar campo para codificar claves de usuarios (ticket #778), +# eliminar campo sin uso (ticket #730), +# añadir clave de acceso a la API REST (tickets #708). +ALTER TABLE usuarios + MODIFY pasguor VARCHAR(56) NOT NULL DEFAULT '', + ADD apikey VARCHAR(32) NOT NULL DEFAULT ''; +# Preparar generación de clave de acceso a la API REST para el usuario principal (ticket #708). +UPDATE usuarios + SET apikey = 'APIKEY' + WHERE idusuario = 1 AND apikey = ''; +# Codificar claves de usuarios (ticket #) +INSERT INTO usuarios (idusuario, pasguor) + SELECT idusuario, pasguor FROM usuarios + ON DUPLICATE KEY UPDATE + idusuario=VALUES(idusuario), pasguor=SHA2(VALUES(pasguor),224); + +# Añadir nº de revisión de imagen restaurada (ticket #737), +# añadir porcentaje de uso de sistema de ficheros (ticket #711), +# evitar errores "TEXT NOT NULL" y "NO_ZERO_DATE" (ticket #730). +ALTER TABLE ordenadores_particiones + MODIFY cache TEXT, + ADD revision SMALLINT UNSIGNED NOT NULL DEFAULT 0 AFTER idimagen, + ADD uso TINYINT NOT NULL DEFAULT 0; +ALTER TABLE acciones + MODIFY restrambito TEXT, + MODIFY fechahorareg DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00', + MODIFY fechahorafin DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00'; +ALTER TABLE parametros + MODIFY descripcion TEXT; +ALTER TABLE tareas + MODIFY restrambito TEXT; + +# Actualizar componentes hardware y añadir nº de serie, clave de acceso a API REST de OGAgent y directorio de ogLive (tickets #713, #718 y #768) +ALTER TABLE tipohardwares + DROP pci; +INSERT INTO tipohardwares (idtipohardware, descripcion, urlimg, nemonico) VALUES + (17, 'Chasis del Sistema', '', 'cha'), + (18, 'Controladores de almacenamiento', '../images/iconos/almacenamiento.png', 'sto'), + (19, 'Tipo de proceso de arranque', '../images/iconos/arranque.png', 'boo'); +ALTER TABLE ordenadores + ADD numserie VARCHAR(25) DEFAULT NULL AFTER nombreordenador, + ADD agentkey VARCHAR(32) DEFAULT NULL, + ADD oglivedir VARCHAR(50) NOT NULL DEFAULT 'ogLive'; + +# Directorios en repo para distintas UO (ticket #678). +ALTER TABLE entidades + ADD ogunit TINYINT(1) NOT NULL DEFAULT 0; +ALTER TABLE centros + ADD directorio VARCHAR(50) DEFAULT ''; + +# Incluir campo ID sistema operativo en el perfil de software (tickets #738 #713) +ALTER TABLE perfilessoft + ADD idnombreso SMALLINT UNSIGNED AFTER idperfilsoft; + +# Añadir campo y generar clave de acceso a la API REST del repositorio (ticket #743). +ALTER TABLE repositorios + ADD apikey VARCHAR(32) NOT NULL DEFAULT ''; +UPDATE repositorios + SET apikey = 'REPOKEY' + WHERE idrepositorio = 1 AND apikey = ''; + +# Nuevas tablas para datos del proyecto Remote PC y operaciones de OGAgent (ticket #708). +CREATE TABLE IF NOT EXISTS remotepc ( + id INT(11) NOT NULL, + reserved DATETIME DEFAULT NULL, + urllogin VARCHAR(100), + urllogout VARCHAR(100), + PRIMARY KEY (id) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE IF NOT EXISTS ogagent_queue ( + id INT(11) NOT NULL AUTO_INCREMENT, + clientid INT(11) NOT NULL, + exectime DATETIME DEFAULT NULL, + operation VARCHAR(25), + PRIMARY KEY (id) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8; + + +# Nuevo comando "Enviar mensaje" (ticket #779) +INSERT INTO comandos (idcomando, descripcion, pagina, gestor, funcion, urlimg, + aplicambito, visuparametros, parametros, comentarios, activo, submenu) VALUES + (16, 'Enviar mensaje', '../comandos/EnviarMensaje.php', '../comandos/gestores/gestor_Comandos.php', 'EnviarMensaje', '', + 31, 'tit;msj', 'nfn;iph;tit;msj', '', 1, '' ); +INSERT INTO parametros (idparametro, nemonico, descripcion, nomidentificador, nomtabla, nomliteral, tipopa, visual) VALUES + (39, 'tit', 'Título', '', '', '', 0, 1), + (40, 'msj', 'Contenido', '', '', '', 0, 1); + +# Crear tabla de log para la cola de acciones (ticket #782) +CREATE TABLE IF NOT EXISTS acciones_log LIKE acciones; +ALTER TABLE acciones_log ADD fecha_borrado DATETIME; +DELIMITER // +CREATE TRIGGER registrar_acciones BEFORE DELETE ON acciones FOR EACH ROW BEGIN + INSERT INTO acciones_log VALUES + (OLD.idaccion, OLD.tipoaccion, OLD.idtipoaccion, OLD.descriaccion, + OLD.idordenador, OLD.ip, OLD.sesion, OLD.idcomando, OLD.parametros, + OLD.fechahorareg, OLD.fechahorafin, OLD.estado, OLD.resultado, + OLD.descrinotificacion, OLD.ambito, OLD.idambito, OLD.restrambito, + OLD.idprocedimiento, OLD.idtarea, OLD.idcentro, OLD.idprogramacion, NOW()); +END// +DELIMITER ; + +# Ampliar programación de tareas hasta 2025 (ticket #732). +ALTER TABLE programaciones + MODIFY annos SMALLINT DEFAULT NULL, + MODIFY meses SMALLINT DEFAULT NULL; + +# Eliminar tabla sin uso (ticket #730). +DROP TABLE IF EXISTS campus; + diff --git a/admin/Database/ogAdmBD-1.1.0-1.1.1pre.sql b/admin/Database/ogAdmBD-1.1.0-1.1.1pre.sql deleted file mode 100644 index 435613a0..00000000 --- a/admin/Database/ogAdmBD-1.1.0-1.1.1pre.sql +++ /dev/null @@ -1,8 +0,0 @@ -### Fichero de actualización de la base de datos. -# OpenGnsys 1.1.0 - OpenGnsys 1.1.1 -#use ogAdmBD - -# Añadir campo para incluir PC de profesor de aula (ticket #816). -ALTER TABLE aulas - ADD idordprofesor INT(11) DEFAULT 0 AFTER puestos; - diff --git a/admin/Database/ogAdmBD-1.1.0a-1.1.1pre.sql b/admin/Database/ogAdmBD-1.1.0a-1.1.1pre.sql new file mode 100644 index 00000000..9b5ccadd --- /dev/null +++ b/admin/Database/ogAdmBD-1.1.0a-1.1.1pre.sql @@ -0,0 +1,8 @@ +### Fichero de actualización de la base de datos. +# OpenGnsys 1.1.0, 1.1.0a - OpenGnsys 1.1.1 +#use ogAdmBD + +# Añadir campo para incluir PC de profesor de aula (ticket #816). +ALTER TABLE aulas + ADD idordprofesor INT(11) DEFAULT 0 AFTER puestos; + diff --git a/admin/Database/ogAdmBD-1.1.0pre-1.1.0.sql b/admin/Database/ogAdmBD-1.1.0pre-1.1.0.sql deleted file mode 100644 index 131e7ba7..00000000 --- a/admin/Database/ogAdmBD-1.1.0pre-1.1.0.sql +++ /dev/null @@ -1,269 +0,0 @@ -### Fichero de actualización de la base de datos. -# OpenGnsys 1.1.0pre - OpenGnsys 1.1.0 -#use ogAdmBD - -### NOTA: la configuración de MySQL solo puede modificarla el usuario "root". -# Soportar cláusuloas GROUP BY especiales para configuración de equipos. -#SET GLOBAL sql_mode = TRIM(BOTH ',' FROM REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', '')); -# Activar calendario de eventos de MySQL. -#SET GLOBAL event_scheduler = ON; - -# Eliminar procedimiento y disparador para evitar errores de ejecución. -DROP PROCEDURE IF EXISTS addcols; -DROP TRIGGER IF EXISTS registrar_acciones; -# Procedimiento para actualización condicional de tablas. -DELIMITER '//' -CREATE PROCEDURE addcols() BEGIN - # Añadir campo para incluir aulas en proyecto Remote PC (ticket #708). - IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='inremotepc' AND TABLE_NAME='aulas' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE aulas - ADD inremotepc TINYINT DEFAULT 0; - END IF; - # Añadir campo para incluir imágenes en proyecto Remote PC (ticket #708). - IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='inremotepc' AND TABLE_NAME='imagenes' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE imagenes - ADD inremotepc TINYINT DEFAULT 0; - END IF; - # Añadir campo para clave de acceso a la API REST (ticket #708). - IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='apikey' AND TABLE_NAME='usuarios' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE usuarios - ADD apikey VARCHAR(32) NOT NULL DEFAULT ''; - END IF; - # Añadir porcentaje de uso de sistema de ficheros (ticket #711) - IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='uso' AND TABLE_NAME='ordenadores_particiones' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE ordenadores_particiones - ADD uso TINYINT NOT NULL DEFAULT 0; - END IF; - # Añadir nº de serie (ticket #713) - IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='numserie' AND TABLE_NAME='ordenadores' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE ordenadores - ADD numserie varchar(25) DEFAULT NULL AFTER nombreordenador; - END IF; - # Añadir campo para clave de acceso a la API REST de OGAgent (ticket #718). - IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='agentkey' AND TABLE_NAME='ordenadores' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE ordenadores - ADD agentkey VARCHAR(32) DEFAULT NULL; - END IF; - # Añadir índice para mostrar correctamente el formulario de estado. - IF NOT EXISTS (SELECT * FROM information_schema.STATISTICS - WHERE INDEX_NAME='idaulaip' AND TABLE_NAME='ordenadores' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE ordenadores - ADD KEY idaulaip (idaula ASC, ip ASC); - END IF; - # Añadir campo para directorio de ogLive asociado al cliente (ticket #768). - IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='oglivedir' AND TABLE_NAME='ordenadores' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE ordenadores - ADD oglivedir VARCHAR(50) NOT NULL DEFAULT 'ogLive'; - END IF; - # Añadir campo para directorio de ogLive asociado al cliente (ticket #768). - IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='oglivedir' AND TABLE_NAME='aulas' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE aulas - ADD oglivedir VARCHAR(50) NOT NULL DEFAULT 'ogLive'; - END IF; - # Eliminar campos sin uso en aulas (ticket #730). - IF EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='cuadro_x' AND TABLE_NAME='aulas' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE aulas - DROP cuadro_x, - DROP cuadro_y; - END IF; - # Eliminar campos no usado en inventario de hardware (ticket #713). - IF EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='pci' AND TABLE_NAME='tipohardwares' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE tipohardwares - DROP pci; - END IF; - # Añadir servidor de sincronización horaria NTP (ticket #725). - IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='ntp' AND TABLE_NAME='aulas' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE aulas - ADD ntp VARCHAR(30) AFTER proxy; - END IF; - # Directorios en repo para distintas UO (ticket #678). - IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='ogunit' AND TABLE_NAME='entidades' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE entidades - ADD ogunit TINYINT(1) NOT NULL DEFAULT 0; - END IF; - IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='directorio' AND TABLE_NAME='centros' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE centros - ADD directorio VARCHAR(50) DEFAULT ''; - END IF; - # Nº de revisión de imagen (ticket #737). - IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='revision' AND TABLE_NAME='imagenes' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE imagenes - ADD revision SMALLINT UNSIGNED NOT NULL DEFAULT 0 AFTER nombreca; - END IF; - IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='revision' AND TABLE_NAME='ordenadores_particiones' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE ordenadores_particiones - ADD revision SMALLINT UNSIGNED NOT NULL DEFAULT 0 AFTER idimagen; - END IF; - # Incluir campo sistema operativo en el perfil de software (tickets #738 #713) - IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='idnombreso' AND TABLE_NAME='perfilessoft' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE perfilessoft - ADD idnombreso SMALLINT UNSIGNED AFTER idperfilsoft; - END IF; - # Añadir campo para clave de acceso a la API REST del repositorio (ticket #743). - IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE COLUMN_NAME='apikey' AND TABLE_NAME='repositorios' AND TABLE_SCHEMA=DATABASE()) - THEN - ALTER TABLE repositorios - ADD apikey VARCHAR(32) NOT NULL DEFAULT ''; - END IF; - # Codificar claves de los usuarios, si fuese necesario (ticket #778) - IF ((SELECT CHARACTER_MAXIMUM_LENGTH FROM information_schema.COLUMNS - WHERE COLUMN_NAME='pasguor' AND TABLE_NAME='usuarios' AND TABLE_SCHEMA=DATABASE()) != 56) - THEN - ALTER TABLE usuarios - MODIFY pasguor VARCHAR(56) NOT NULL DEFAULT ''; - INSERT INTO usuarios (idusuario, pasguor) - SELECT idusuario, pasguor FROM usuarios - ON DUPLICATE KEY UPDATE - pasguor=SHA2(VALUES(pasguor), 224); - END IF; - # Crear tabla de log para la cola de acciones (ticket #782) - IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS - WHERE TABLE_NAME='acciones_log' AND TABLE_SCHEMA=DATABASE()) - THEN - CREATE TABLE acciones_log LIKE acciones; - ALTER TABLE acciones_log ADD fecha_borrado DATETIME; - END IF; -END// -# Disparador para mover acciones borradas a la tabla de registro de acciones. -CREATE TRIGGER registrar_acciones BEFORE DELETE ON acciones FOR EACH ROW -BEGIN - INSERT INTO acciones_log VALUES - (OLD.idaccion, OLD.tipoaccion, OLD.idtipoaccion, OLD.descriaccion, - OLD.idordenador, OLD.ip, OLD.sesion, OLD.idcomando, OLD.parametros, - OLD.fechahorareg, OLD.fechahorafin, OLD.estado, OLD.resultado, - OLD.descrinotificacion, OLD.ambito, OLD.idambito, OLD.restrambito, - OLD.idprocedimiento, OLD.idtarea, OLD.idcentro, OLD.idprogramacion, - NOW()); -END// -# Ejecutar actualización condicional. -DELIMITER ';' -CALL addcols(); -DROP PROCEDURE addcols; - -# Nuevos tipos de particiones y de sistemas de ficheros. -INSERT INTO tipospar (codpar, tipopar, clonable) VALUES - (CONV('A9',16,10), 'NETBSD', 1), - (CONV('2700',16,10), 'WIN-RECOV', 1), - (CONV('8302',16,10), 'LINUX', 1), - (CONV('A504',16,10), 'FREEBSD', 1), - (CONV('A901',16,10), 'NETBSD-SWAP', 0), - (CONV('A902',16,10), 'NETBSD', 1), - (CONV('A903',16,10), 'NETBSD', 1), - (CONV('A904',16,10), 'NETBSD', 1), - (CONV('A905',16,10), 'NETBSD', 1), - (CONV('A906',16,10), 'NETBSD-RAID', 1), - (CONV('AF02',16,10), 'HFS-RAID', 1), - (CONV('FB00',16,10), 'VMFS', 1), - (CONV('FB01',16,10), 'VMFS-RESERV', 1), - (CONV('FB02',16,10), 'VMFS-KRN', 1), - (CONV('10000',16,10), 'LVM-LV', 1), - (CONV('10010',16,10), 'ZFS-VOL', 1) - ON DUPLICATE KEY UPDATE - codpar=VALUES(codpar), tipopar=VALUES(tipopar), clonable=VALUES(clonable); -INSERT INTO sistemasficheros (idsistemafichero, nemonico, descripcion) VALUES - (19, 'LINUX-SWAP', 'LINUX-SWAP'), - (20, 'F2FS', 'F2FS'), - (21, 'NILFS2', 'NILFS2') - ON DUPLICATE KEY UPDATE - idsistemafichero=VALUES(idsistemafichero), nemonico=VALUES(nemonico), descripcion=VALUES(descripcion); - -# Preparar generación de claves de acceso a la API REST para el usuario principal y a la del repositorio principal (tickets #708 y #743). -UPDATE usuarios - SET apikey = 'APIKEY' - WHERE idusuario = 1 AND apikey = ''; -UPDATE repositorios - SET apikey = 'REPOKEY' - WHERE idrepositorio = 1 AND apikey = ''; - -# Nuevos componentes hardware (ticket #713) -INSERT INTO tipohardwares (idtipohardware, descripcion, urlimg, nemonico) VALUES - (17, 'Chasis del Sistema', '', 'cha'), - (18, 'Controladores de almacenamiento', '../images/iconos/almacenamiento.png', 'sto'), - (19, 'Tipo de proceso de arranque', '../images/iconos/arranque.png', 'boo') - ON DUPLICATE KEY UPDATE - descripcion=VALUES(descripcion), urlimg=VALUES(urlimg), nemonico=VALUES(nemonico); - -# Número de puestos del aula permite valores hasta 32768 (ticket #747) -ALTER TABLE aulas - MODIFY puestos SMALLINT DEFAULT NULL; - -# Nuevas tablas para datos del proyecto Remote PC y operaciones de OGAgent (ticket #708). -DROP TABLE IF EXISTS remotepc; -CREATE TABLE remotepc ( - id INT(11) NOT NULL, - reserved DATETIME DEFAULT NULL, - urllogin VARCHAR(100), - urllogout VARCHAR(100), - language VARCHAR(5), - PRIMARY KEY (id) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -DROP TABLE IF EXISTS ogagent_queue; -CREATE TABLE ogagent_queue ( - id INT(11) NOT NULL AUTO_INCREMENT, - clientid INT(11) NOT NULL, - exectime DATETIME DEFAULT NULL, - operation VARCHAR(25), - PRIMARY KEY (id) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8; - -# Nuevo comando "Enviar mensaje" (ticket #779) -INSERT INTO comandos (idcomando, descripcion, pagina, gestor, funcion, urlimg, - aplicambito, visuparametros, parametros, comentarios, activo, submenu) VALUES - (16, 'Enviar mensaje', '../comandos/EnviarMensaje.php', '../comandos/gestores/gestor_Comandos.php', 'EnviarMensaje', '', 31, '', '', '', 1, '' ) - ON DUPLICATE KEY UPDATE - descripcion=VALUES(descripcion), pagina=VALUES(pagina), - gestor=VALUES(gestor), funcion=VALUES(funcion), - aplicambito=VALUES(aplicambito), activo=VALUES(activo); -INSERT INTO parametros (idparametro, nemonico, descripcion, nomidentificador, nomtabla, nomliteral, tipopa, visual) VALUES - (39, 'tit', 'Título', '', '', '', 0, 1), - (40, 'msj', 'Contenido', '', '', '', 0, 1) - ON DUPLICATE KEY UPDATE - nemonico=VALUES(nemonico), descripcion=VALUES(descripcion), - tipopa=VALUES(tipopa), visual=VALUES(visual); - -# Evitar error de MySQL con modo NO_ZERO_DATE (ticket #730). -ALTER TABLE acciones - MODIFY fechahorareg DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00', - MODIFY fechahorafin DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00'; - -# Ampliar programación de tareas hasta 2025 (ticket #732). -ALTER TABLE programaciones - MODIFY annos SMALLINT DEFAULT NULL; - -# Eliminar tabla sin uso (ticket #730). -DROP TABLE IF EXISTS campus; - diff --git a/admin/Database/ogAdmBD-1.1.0pre-1.1.0a.sql b/admin/Database/ogAdmBD-1.1.0pre-1.1.0a.sql new file mode 100644 index 00000000..131e7ba7 --- /dev/null +++ b/admin/Database/ogAdmBD-1.1.0pre-1.1.0a.sql @@ -0,0 +1,269 @@ +### Fichero de actualización de la base de datos. +# OpenGnsys 1.1.0pre - OpenGnsys 1.1.0 +#use ogAdmBD + +### NOTA: la configuración de MySQL solo puede modificarla el usuario "root". +# Soportar cláusuloas GROUP BY especiales para configuración de equipos. +#SET GLOBAL sql_mode = TRIM(BOTH ',' FROM REPLACE(@@sql_mode, 'ONLY_FULL_GROUP_BY', '')); +# Activar calendario de eventos de MySQL. +#SET GLOBAL event_scheduler = ON; + +# Eliminar procedimiento y disparador para evitar errores de ejecución. +DROP PROCEDURE IF EXISTS addcols; +DROP TRIGGER IF EXISTS registrar_acciones; +# Procedimiento para actualización condicional de tablas. +DELIMITER '//' +CREATE PROCEDURE addcols() BEGIN + # Añadir campo para incluir aulas en proyecto Remote PC (ticket #708). + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='inremotepc' AND TABLE_NAME='aulas' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE aulas + ADD inremotepc TINYINT DEFAULT 0; + END IF; + # Añadir campo para incluir imágenes en proyecto Remote PC (ticket #708). + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='inremotepc' AND TABLE_NAME='imagenes' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE imagenes + ADD inremotepc TINYINT DEFAULT 0; + END IF; + # Añadir campo para clave de acceso a la API REST (ticket #708). + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='apikey' AND TABLE_NAME='usuarios' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE usuarios + ADD apikey VARCHAR(32) NOT NULL DEFAULT ''; + END IF; + # Añadir porcentaje de uso de sistema de ficheros (ticket #711) + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='uso' AND TABLE_NAME='ordenadores_particiones' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE ordenadores_particiones + ADD uso TINYINT NOT NULL DEFAULT 0; + END IF; + # Añadir nº de serie (ticket #713) + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='numserie' AND TABLE_NAME='ordenadores' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE ordenadores + ADD numserie varchar(25) DEFAULT NULL AFTER nombreordenador; + END IF; + # Añadir campo para clave de acceso a la API REST de OGAgent (ticket #718). + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='agentkey' AND TABLE_NAME='ordenadores' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE ordenadores + ADD agentkey VARCHAR(32) DEFAULT NULL; + END IF; + # Añadir índice para mostrar correctamente el formulario de estado. + IF NOT EXISTS (SELECT * FROM information_schema.STATISTICS + WHERE INDEX_NAME='idaulaip' AND TABLE_NAME='ordenadores' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE ordenadores + ADD KEY idaulaip (idaula ASC, ip ASC); + END IF; + # Añadir campo para directorio de ogLive asociado al cliente (ticket #768). + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='oglivedir' AND TABLE_NAME='ordenadores' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE ordenadores + ADD oglivedir VARCHAR(50) NOT NULL DEFAULT 'ogLive'; + END IF; + # Añadir campo para directorio de ogLive asociado al cliente (ticket #768). + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='oglivedir' AND TABLE_NAME='aulas' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE aulas + ADD oglivedir VARCHAR(50) NOT NULL DEFAULT 'ogLive'; + END IF; + # Eliminar campos sin uso en aulas (ticket #730). + IF EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='cuadro_x' AND TABLE_NAME='aulas' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE aulas + DROP cuadro_x, + DROP cuadro_y; + END IF; + # Eliminar campos no usado en inventario de hardware (ticket #713). + IF EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='pci' AND TABLE_NAME='tipohardwares' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE tipohardwares + DROP pci; + END IF; + # Añadir servidor de sincronización horaria NTP (ticket #725). + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='ntp' AND TABLE_NAME='aulas' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE aulas + ADD ntp VARCHAR(30) AFTER proxy; + END IF; + # Directorios en repo para distintas UO (ticket #678). + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='ogunit' AND TABLE_NAME='entidades' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE entidades + ADD ogunit TINYINT(1) NOT NULL DEFAULT 0; + END IF; + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='directorio' AND TABLE_NAME='centros' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE centros + ADD directorio VARCHAR(50) DEFAULT ''; + END IF; + # Nº de revisión de imagen (ticket #737). + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='revision' AND TABLE_NAME='imagenes' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE imagenes + ADD revision SMALLINT UNSIGNED NOT NULL DEFAULT 0 AFTER nombreca; + END IF; + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='revision' AND TABLE_NAME='ordenadores_particiones' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE ordenadores_particiones + ADD revision SMALLINT UNSIGNED NOT NULL DEFAULT 0 AFTER idimagen; + END IF; + # Incluir campo sistema operativo en el perfil de software (tickets #738 #713) + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='idnombreso' AND TABLE_NAME='perfilessoft' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE perfilessoft + ADD idnombreso SMALLINT UNSIGNED AFTER idperfilsoft; + END IF; + # Añadir campo para clave de acceso a la API REST del repositorio (ticket #743). + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='apikey' AND TABLE_NAME='repositorios' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE repositorios + ADD apikey VARCHAR(32) NOT NULL DEFAULT ''; + END IF; + # Codificar claves de los usuarios, si fuese necesario (ticket #778) + IF ((SELECT CHARACTER_MAXIMUM_LENGTH FROM information_schema.COLUMNS + WHERE COLUMN_NAME='pasguor' AND TABLE_NAME='usuarios' AND TABLE_SCHEMA=DATABASE()) != 56) + THEN + ALTER TABLE usuarios + MODIFY pasguor VARCHAR(56) NOT NULL DEFAULT ''; + INSERT INTO usuarios (idusuario, pasguor) + SELECT idusuario, pasguor FROM usuarios + ON DUPLICATE KEY UPDATE + pasguor=SHA2(VALUES(pasguor), 224); + END IF; + # Crear tabla de log para la cola de acciones (ticket #782) + IF NOT EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE TABLE_NAME='acciones_log' AND TABLE_SCHEMA=DATABASE()) + THEN + CREATE TABLE acciones_log LIKE acciones; + ALTER TABLE acciones_log ADD fecha_borrado DATETIME; + END IF; +END// +# Disparador para mover acciones borradas a la tabla de registro de acciones. +CREATE TRIGGER registrar_acciones BEFORE DELETE ON acciones FOR EACH ROW +BEGIN + INSERT INTO acciones_log VALUES + (OLD.idaccion, OLD.tipoaccion, OLD.idtipoaccion, OLD.descriaccion, + OLD.idordenador, OLD.ip, OLD.sesion, OLD.idcomando, OLD.parametros, + OLD.fechahorareg, OLD.fechahorafin, OLD.estado, OLD.resultado, + OLD.descrinotificacion, OLD.ambito, OLD.idambito, OLD.restrambito, + OLD.idprocedimiento, OLD.idtarea, OLD.idcentro, OLD.idprogramacion, + NOW()); +END// +# Ejecutar actualización condicional. +DELIMITER ';' +CALL addcols(); +DROP PROCEDURE addcols; + +# Nuevos tipos de particiones y de sistemas de ficheros. +INSERT INTO tipospar (codpar, tipopar, clonable) VALUES + (CONV('A9',16,10), 'NETBSD', 1), + (CONV('2700',16,10), 'WIN-RECOV', 1), + (CONV('8302',16,10), 'LINUX', 1), + (CONV('A504',16,10), 'FREEBSD', 1), + (CONV('A901',16,10), 'NETBSD-SWAP', 0), + (CONV('A902',16,10), 'NETBSD', 1), + (CONV('A903',16,10), 'NETBSD', 1), + (CONV('A904',16,10), 'NETBSD', 1), + (CONV('A905',16,10), 'NETBSD', 1), + (CONV('A906',16,10), 'NETBSD-RAID', 1), + (CONV('AF02',16,10), 'HFS-RAID', 1), + (CONV('FB00',16,10), 'VMFS', 1), + (CONV('FB01',16,10), 'VMFS-RESERV', 1), + (CONV('FB02',16,10), 'VMFS-KRN', 1), + (CONV('10000',16,10), 'LVM-LV', 1), + (CONV('10010',16,10), 'ZFS-VOL', 1) + ON DUPLICATE KEY UPDATE + codpar=VALUES(codpar), tipopar=VALUES(tipopar), clonable=VALUES(clonable); +INSERT INTO sistemasficheros (idsistemafichero, nemonico, descripcion) VALUES + (19, 'LINUX-SWAP', 'LINUX-SWAP'), + (20, 'F2FS', 'F2FS'), + (21, 'NILFS2', 'NILFS2') + ON DUPLICATE KEY UPDATE + idsistemafichero=VALUES(idsistemafichero), nemonico=VALUES(nemonico), descripcion=VALUES(descripcion); + +# Preparar generación de claves de acceso a la API REST para el usuario principal y a la del repositorio principal (tickets #708 y #743). +UPDATE usuarios + SET apikey = 'APIKEY' + WHERE idusuario = 1 AND apikey = ''; +UPDATE repositorios + SET apikey = 'REPOKEY' + WHERE idrepositorio = 1 AND apikey = ''; + +# Nuevos componentes hardware (ticket #713) +INSERT INTO tipohardwares (idtipohardware, descripcion, urlimg, nemonico) VALUES + (17, 'Chasis del Sistema', '', 'cha'), + (18, 'Controladores de almacenamiento', '../images/iconos/almacenamiento.png', 'sto'), + (19, 'Tipo de proceso de arranque', '../images/iconos/arranque.png', 'boo') + ON DUPLICATE KEY UPDATE + descripcion=VALUES(descripcion), urlimg=VALUES(urlimg), nemonico=VALUES(nemonico); + +# Número de puestos del aula permite valores hasta 32768 (ticket #747) +ALTER TABLE aulas + MODIFY puestos SMALLINT DEFAULT NULL; + +# Nuevas tablas para datos del proyecto Remote PC y operaciones de OGAgent (ticket #708). +DROP TABLE IF EXISTS remotepc; +CREATE TABLE remotepc ( + id INT(11) NOT NULL, + reserved DATETIME DEFAULT NULL, + urllogin VARCHAR(100), + urllogout VARCHAR(100), + language VARCHAR(5), + PRIMARY KEY (id) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8; +DROP TABLE IF EXISTS ogagent_queue; +CREATE TABLE ogagent_queue ( + id INT(11) NOT NULL AUTO_INCREMENT, + clientid INT(11) NOT NULL, + exectime DATETIME DEFAULT NULL, + operation VARCHAR(25), + PRIMARY KEY (id) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +# Nuevo comando "Enviar mensaje" (ticket #779) +INSERT INTO comandos (idcomando, descripcion, pagina, gestor, funcion, urlimg, + aplicambito, visuparametros, parametros, comentarios, activo, submenu) VALUES + (16, 'Enviar mensaje', '../comandos/EnviarMensaje.php', '../comandos/gestores/gestor_Comandos.php', 'EnviarMensaje', '', 31, '', '', '', 1, '' ) + ON DUPLICATE KEY UPDATE + descripcion=VALUES(descripcion), pagina=VALUES(pagina), + gestor=VALUES(gestor), funcion=VALUES(funcion), + aplicambito=VALUES(aplicambito), activo=VALUES(activo); +INSERT INTO parametros (idparametro, nemonico, descripcion, nomidentificador, nomtabla, nomliteral, tipopa, visual) VALUES + (39, 'tit', 'Título', '', '', '', 0, 1), + (40, 'msj', 'Contenido', '', '', '', 0, 1) + ON DUPLICATE KEY UPDATE + nemonico=VALUES(nemonico), descripcion=VALUES(descripcion), + tipopa=VALUES(tipopa), visual=VALUES(visual); + +# Evitar error de MySQL con modo NO_ZERO_DATE (ticket #730). +ALTER TABLE acciones + MODIFY fechahorareg DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00', + MODIFY fechahorafin DATETIME NOT NULL DEFAULT '1970-01-01 00:00:00'; + +# Ampliar programación de tareas hasta 2025 (ticket #732). +ALTER TABLE programaciones + MODIFY annos SMALLINT DEFAULT NULL; + +# Eliminar tabla sin uso (ticket #730). +DROP TABLE IF EXISTS campus; + -- cgit v1.2.3-18-g5258 From 8296e89d159d0bfa2ff3bfef9a9ba31a5c05589a Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Mon, 12 Nov 2018 11:23:07 +0100 Subject: #849 Incorporar ordenadores: se eliminan comentarios al final de línea antes de incluir los equipos en el aula. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/WebConsole/varios/incorporaordenadores.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/admin/WebConsole/varios/incorporaordenadores.php b/admin/WebConsole/varios/incorporaordenadores.php index ec303ea0..2615fbad 100644 --- a/admin/WebConsole/varios/incorporaordenadores.php +++ b/admin/WebConsole/varios/incorporaordenadores.php @@ -108,6 +108,8 @@ function procesaLineas($cmd,$idaula,$buffer) $MAC=""; $IP=""; $sw=false; + // Eliminamos comentarios a final de línea + $buffer = preg_replace(array("/\#.*\r\n/", "/\#.*\r/", "/\#.*\n/"), "", $buffer."\n"); $equipos = preg_split('/}/',$buffer); -- cgit v1.2.3-18-g5258 From e0cea763bb2186ea3c7a76adae259a0f68f58610 Mon Sep 17 00:00:00 2001 From: adv Date: Tue, 13 Nov 2018 05:58:04 +0000 Subject: #851 ogMcastSyntax expand client multicast session --- client/engine/Protocol.lib | 184 ++++++++++++++++++++++++++++----------------- 1 file changed, 115 insertions(+), 69 deletions(-) diff --git a/client/engine/Protocol.lib b/client/engine/Protocol.lib index ccc24c6d..f3dbdc5b 100755 --- a/client/engine/Protocol.lib +++ b/client/engine/Protocol.lib @@ -337,6 +337,9 @@ fi #@version 1.1 - Control de errores en transferencia multicast (ticket #781) #@author Irina Gomez, ETSII Universidad de Sevilla #@date 2017/04/20 +#@version 1.1.0.a - Parametros de clientes como sesision de multicast (ticket #851) +#@author Antonio J. Doblas Viso +#@date 2018/09/11 #*/ ## # @@ -356,7 +359,9 @@ if [ "$*" == "help" -o "$2" == "help" ]; then "sessionServer syntax: portbase:method:mcastaddress:speed:nclients:ntimeWaitingUntilNclients " \ "sessionServer example: 9000:full-duplex|half-duplex|broadcast:239.194.17.36:80M:50:60 " \ "sessionClient syntax: portbase " \ - "sessionClient example: 9000 " + "sessionClient example: 9000 "\ + "sessionClient syntax: portbase:serverIP:TimeOut_session:TimeOut_transmision" \ + "sessionClient example: 9000:172.17.88.161:40:120" return fi PERROR=0 @@ -365,36 +370,37 @@ PERROR=0 ISUDPCAST=$(udp-receiver --help 2>&1) echo $ISUDPCAST | grep start-timeout > /dev/null || ogRaiseError $OG_ERR_NOTEXEC "upd-cast no existe o version antigua -requerida 2009-"|| return $? -# Si la version de udp-receiver permite --receive-timeout utilizamos la opción -if echo $ISUDPCAST | grep receive-timeout &>/dev/null; then - RECEIVERTIMEOUT=" --receive-timeout $MCASTWAIT" -else - RECEIVERTIMEOUT="" -fi - -# Error si no se reciben $PARM parámetros. +############ BEGIN NUMBERS PARAMETERS CHECK AND SESSION OPTIONS IF CLIENT OR SERVER ############## +# Definimos los parametros de la funcion segun la opcion de envio/recepcion. echo "$1" | grep "PARTITION" > /dev/null && PARM=5 || PARM=3 [ "$#" -eq "$PARM" ] || ogRaiseError $OG_ERR_FORMAT "sin parametros"|| return $? - - -# 1er param check +# 1er param check: opcion de envio/recepcion ogCheckStringInGroup "$1" "SENDPARTITION sendpartition RECEIVERPARTITION receiverpartition SENDFILE sendfile RECEIVERFILE receiverfile" || ogRaiseError $OG_ERR_FORMAT "1st param: $1" || PERROR=1 #return $? - -# 2º param check +# 1º param check : opcion de cliente/servidor echo "$1" | grep "SEND" > /dev/null && MODE=server || MODE=client -#TODO: diferenciamos los paramatros especificos de la sessión multicast -#SI: controlamos todos los parametros de la sessión multicast. +# 2º param check: sesion multicast cliente/servidor. comprobamos el numero de parametros segun el tipo de sesion cliente o servidor. +#Definimos los parametros de la sesion multicast. La sesion de cliente seran 3, aunque uno es el obligado y dos opcionales. puerto:server:autostart [ $MODE == "client" ] && SESSIONPARM=1 || SESSIONPARM=6 +#Controlamos el numero de paratros incluidos en la sesion usada como paraetro $2 OIFS=$IFS; IFS=':' ; SESSION=($2); IFS=$OIFS +#Controlamos la sesion multicast del server +if [ $MODE == "server" ] +then + [[ ${#SESSION[*]} == $SESSIONPARM ]] || ogRaiseError $OG_ERR_FORMAT "parametros session de servidor multicast no completa" || PERROR=2# return $? +fi +#controlamos la sesion de cliente. +if [ $MODE == "client" ] +then + [[ ${#SESSION[*]} -ge $SESSIONPARM ]] || ogRaiseError $OG_ERR_FORMAT "parametros session de cliente multicast no completa" || PERROR=2# return $? +fi +############ END NUMBERS PARAMETERS CHECK ############## - -[[ ${#SESSION[*]} == $SESSIONPARM ]] || ogRaiseError $OG_ERR_FORMAT "parametros session multicast no completa" || PERROR=2# return $? - - -#controlamos el PORTBASE de la sesion. Comun.- +##### BEGIN SERVER SESSION ##### +# 2º param check: controlamos el primer componente comun de las sesiones de servidor y cliente: PORTBASE PORTBASE=${SESSION[0]} ogCheckStringInGroup ${SESSION[0]} "$(seq 9000 2 9050)" || ogRaiseError $OG_ERR_FORMAT "McastSession portbase ${SESSION[0]}" || PERROR=3 #return $? +# 2º param check: Controlamos el resto de componenentes de la sesion del servidor. if [ $MODE == "server" ] then ogCheckStringInGroup ${SESSION[1]} "full-duplex FULL-DUPLEX half-duplex HALF-DUPLEX broadcast BROADCAST" || ogRaiseError $OG_ERR_FORMAT "McastSession method ${SESSION[1]}" || PERROR=4 #return $? @@ -422,67 +428,106 @@ then ogCheckStringInGroup "$5" "lzop LZOP gzip GZIP 0 1" || ogRaiseError $OG_ERR_NOTFOUND " compresor $5 no valido" || PERROR=11 #return $? LEVEL=$5 fi - - +# Controlamos si ha habido errores en la comprobacion de la sesion de servidor. if [ "$PERROR" != "0" ]; then ogRaiseError $OG_ERR_MCASTSYNTAXT " $PERROR"; return $? fi - - -# Valores estandar no configurables. +# Asignamos mas valores no configurables a la sesioe servidor. CERROR="8x8/128" - -# opción del usuo de tuberia intermedia en memoria mbuffer. +# opcion del usuo de tuberia intermedia en memoria mbuffer. which mbuffer > /dev/null && MBUFFER=" --pipe 'mbuffer -q -m 20M' " -# Generamos la instrucción base de multicast -Envio,Recepcion- +# Generamos la instruccion base del servidor de multicast -Envio- SYNTAXSERVER="udp-sender $MBUFFER --nokbd --portbase $PORTBASE --$METHOD --mcast-data-address $ADDRESS --fec $CERROR --max-bitrate $BITRATE --ttl 16 --min-clients $NCLIENTS --max-wait $MAXTIME --autostart $MAXTIME --log /tmp/mcast.log" -#SYNTAXCLIENT="udp-receiver $MBUFFER --portbase $PORTBASE " +########################################################################## +#### END SERVER SESSION ############## -# Deteccion automatica de la subred del cliente para anadir la IP del repositorio a la orden udp-receiver en el caso de encontrarse en distinta subred del repo -REPOIP="$(ogGetRepoIp)" -CLIENTIP=$(ip -o address show up | awk '$2!~/lo/ {if ($3~/inet$/) {printf ("%s ", $4)}}') -MASCARA=`echo $CLIENTIP | cut -f2 -d/` -CLIENTIP=`echo $CLIENTIP | cut -f1 -d/` -RIPBT="" -IPBT="" -for (( i = 1 ; i < 5 ; i++ )) -do - RIP=`echo $REPOIP | cut -f$i -d.` - RIP=`echo "$[$RIP + 256]"` - RIPB="" - while [ $RIP -gt 0 ] - do - let COCIENTE=$RIP/2 - let RESTO=$RIP%2 - RIPB=$RESTO$RIPB - RIP=$COCIENTE - done - RIPB=`echo "$RIPB" | cut -c2-` - RIPBT=$RIPBT$RIPB - IP=`echo $CLIENTIP | cut -f$i -d.` - IP=`echo "$[$IP + 256]"` - IPB="" - while [ $IP -gt 0 ] +##### BEGIN CLIENT SESSION ##### +#La primera opcion PORTBASE, ya esta controlado. Porque es comun al server y al cliente. +#La segunda opcion de la sesion para el cliente:: SERVERADDRES +if ogCheckIpAddress ${SESSION[1]} +then + SERVERADDRESS=" --mcast-rdv-address ${SESSION[1]}" +else + # Deteccion automatica de la subred del cliente para anadir la IP del repositorio a la orden udp-receiver en el caso de encontrarse en distinta subred del repo + REPOIP="$(ogGetRepoIp)" + CLIENTIP=$(ip -o address show up | awk '$2!~/lo/ {if ($3~/inet$/) {printf ("%s ", $4)}}') + MASCARA=`echo $CLIENTIP | cut -f2 -d/` + CLIENTIP=`echo $CLIENTIP | cut -f1 -d/` + RIPBT="" + IPBT="" + for (( i = 1 ; i < 5 ; i++ )) do - let COCIENTE=$IP/2 - let RESTO=$IP%2 - IPB=$RESTO$IPB - IP=$COCIENTE + RIP=`echo $REPOIP | cut -f$i -d.` + RIP=`echo "$[$RIP + 256]"` + RIPB="" + while [ $RIP -gt 0 ] + do + let COCIENTE=$RIP/2 + let RESTO=$RIP%2 + RIPB=$RESTO$RIPB + RIP=$COCIENTE + done + RIPB=`echo "$RIPB" | cut -c2-` + RIPBT=$RIPBT$RIPB + IP=`echo $CLIENTIP | cut -f$i -d.` + IP=`echo "$[$IP + 256]"` + IPB="" + while [ $IP -gt 0 ] + do + let COCIENTE=$IP/2 + let RESTO=$IP%2 + IPB=$RESTO$IPB + IP=$COCIENTE + done + IPB=`echo "$IPB" | cut -c2-` + IPBT=$IPBT$IPB done - IPB=`echo "$IPB" | cut -c2-` - IPBT=$IPBT$IPB -done -MCASTWAIT=${MCASTWAIT:-120} -REPOSUBRED=`echo $RIPBT | cut -c1-$MASCARA` -CLIENTSUBRED=`echo $IPBT | cut -c1-$MASCARA` -if [ $REPOSUBRED == $CLIENTSUBRED ]; then - SYNTAXCLIENT="udp-receiver $MBUFFER --portbase $PORTBASE $RECEIVERTIMEOUT --start-timeout $MCASTWAIT" -else - SYNTAXCLIENT="udp-receiver $MBUFFER --portbase $PORTBASE --mcast-rdv-address $REPOIP $RECEIVERTIMEOUT --start-timeout $MCASTWAIT" + REPOSUBRED=`echo $RIPBT | cut -c1-$MASCARA` + CLIENTSUBRED=`echo $IPBT | cut -c1-$MASCARA` + if [ $REPOSUBRED == $CLIENTSUBRED ]; then + SERVERADDRESS=" " + else + SERVERADDRESS=" --mcast-rdv-address $REPOIP" + fi fi +#La tercera opcion de la sesion para el cliente: ${SESSION[2]} ERRORSESSION - TIMEOUT ERROR IF NO FOUNT SESSEION MULTICAST +if ogCheckStringInReg ${SESSION[2]} "^[0-9]{1,10}$" &>/dev/null +then + case ${SESSION[2]} in + 0) + ERRORSESSION=" " + ;; + *) + ERRORSESSION=" --start-timeout ${SESSION[2]}" + ;; + esac +else + #asignamos valor definido en el engine.cfg + ERRORSESSION=" --start-timeout $MCASTERRORSESSION" +fi +#La cuarta opcion de la sesion para el cliente: ${SESSION[2]} ERROR TRANSFER - TIMEOUT EEOR IF NOT RECEIVER DATA FROM SERVER +if ogCheckStringInReg ${SESSION[3]} "^[0-9]{1,10}$" &>/dev/null +then + case ${SESSION[3]} in + 0) + ABORTTRANSMISSION=" " + ;; + *) + ABORTTRANSMISSION=" --receive-timeout ${SESSION[3]}" + ;; + esac +else + #asignamos valor definido en el engine.cfg + ABORTTRANSMISSION=" --receive-timeout $MCASTWAIT" +fi +#Componenemos la sesion multicast del cliente +SYNTAXCLIENT="udp-receiver $MBUFFER --portbase $PORTBASE $SERVERADDRESS $ERRORSESSION $ABORTTRANSMISSION --log /tmp/mcast.log" +########################################################################## +#### END CLIENT SESSION ############## + ######## BEGIN MAIN PROGAM ##### case "$1" in SENDPARTITION) PROG1=`ogCreateImageSyntax $DEVICE " " $TOOL $LEVEL | awk -F"|" '{print $1 "|" $3}' | tr -d ">"` @@ -502,6 +547,7 @@ SENDPARTITION) *) ;; esac +######## END MAIN PROGAM ##### } -- cgit v1.2.3-18-g5258 From 8c10b3d45227737dad6326b1e3bb0b7c540329e4 Mon Sep 17 00:00:00 2001 From: adv Date: Tue, 13 Nov 2018 06:06:57 +0000 Subject: #851 cloneRemoteFromMaster define mcast client session as port:MASTERIP:0:0 --- client/shared/scripts/cloneRemoteFromMaster | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/shared/scripts/cloneRemoteFromMaster b/client/shared/scripts/cloneRemoteFromMaster index 9aedefde..b78bd629 100755 --- a/client/shared/scripts/cloneRemoteFromMaster +++ b/client/shared/scripts/cloneRemoteFromMaster @@ -57,6 +57,10 @@ #@version 1.0.6 - Uso de la funcion ogExecuteAndLog #@author Antonio J. Doblas Viso. Universidad de Malaga. #@date 2012/02/12 +#@version 1.1.0.a - sesion multicast cliente puerto:master:0:0 (ticket #872) +#@author Antonio J. Doblas Viso +#@date 2018/09/11 +#*/ ## #*/ ## #test 1. cliente sin particiones. Detectado TODO: crear estrucutras de particiones @@ -106,7 +110,7 @@ PROTOCOL="$4" case "${PROTOCOL^^}" in MULTICAST) SESSIONMCASTSERVER=$5 - SESSIONMCASTCLIENT=`echo $5 | awk -F: '{print $1}'` + SESSIONMCASTCLIENT=`echo $5 | awk -F: '{print $1}'`:$MASTERIP:0:0 ;; UNICAST) SESSIONUCASTSERVER=$5 -- cgit v1.2.3-18-g5258 From 7e759ed664e5efbae81f08f9177abd02297878da Mon Sep 17 00:00:00 2001 From: adv Date: Tue, 13 Nov 2018 06:13:58 +0000 Subject: #851 engine.cfg and engine.json support both clients abort: MCASTERRORSESSION (during the establishment sesion multicast) and MCASTWAIT (during trasfer error) --- client/shared/etc/engine.cfg | 5 ++++- client/shared/etc/engine.json | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/client/shared/etc/engine.cfg b/client/shared/etc/engine.cfg index fd5ecd90..279acd50 100644 --- a/client/shared/etc/engine.cfg +++ b/client/shared/etc/engine.cfg @@ -24,7 +24,10 @@ IMGREDUCE="TRUE" #Al enviar particion reducir el sistema de archivos previamente. OGWINREDUCE=TRUE -# MULTICAST: timeout si la transferencia no comienza o se interrumpe. +# 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 diff --git a/client/shared/etc/engine.json b/client/shared/etc/engine.json index 909a82f7..ef34de5e 100644 --- a/client/shared/etc/engine.json +++ b/client/shared/etc/engine.json @@ -64,9 +64,14 @@ "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 not begins or it's interrupted (seconds)", + "description": "timout if Multicast transfer does it's interrupted (seconds)", "name": "MCASTWAIT", "value": 30 }, -- cgit v1.2.3-18-g5258 From fc57da80612c925beaf3599d5d2e5072bbb178b5 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Tue, 13 Nov 2018 10:44:47 +0100 Subject: #872: Update list of closed tickets. --- doc/CHANGELOG.es.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/CHANGELOG.es.txt b/doc/CHANGELOG.es.txt index 0efb51f1..2347067e 100644 --- a/doc/CHANGELOG.es.txt +++ b/doc/CHANGELOG.es.txt @@ -35,6 +35,7 @@ Lista de cambios incluidos en OpenGnsys 1.1.0a (versión de mantenimiento) ---------------------------------------------- Tickets resueltos en módulo OpenGnsys Cloning Engine: +#851 Ampliar parámetros de una sesión multicast para los clientes (corrección) #868 ConfiguraOs: error al desinstalar el agente de sistema operativo antiguo (corrección) #871 Error al crear particiones lógicas en discos con sectores de 4 KB (corrección) @@ -50,6 +51,7 @@ Tickets resueltos en módulo OpenGnsys Repository Server: Tickets resueltos en módulo OpenGnsys Web Admin Console: #835 Problemas al listar plantillas en Nerboot Avanzado (corrección) +#849 Incorporar ordenadores de dhcp no admite comentarios tras la declarción de un host (corrección) #867 La ayuda en la consola incluirá más información #870 Netboot avanzado no crea la plantilla de arranque si el equipo no tiene asignado un repositorio (corrección) -- cgit v1.2.3-18-g5258 From 348b5c973a033baec95cb0bd460594ab117ad5ce Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Tue, 13 Nov 2018 11:50:44 +0100 Subject: #855 #679 Los script de crear o restaurar imágenes sincronizadas permiten cambiar de repositorio. ogChangeRepo: se resuelve errata por la que no tomaba los permisos (ro|rw) del repositorio. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/engine/Net.lib | 6 +-- client/engine/Rsync.lib | 2 +- client/shared/scripts/createBaseImage | 54 ++++++++++++++--------- client/shared/scripts/createDiffImage | 81 ++++++++++++++++++++-------------- client/shared/scripts/restoreBaseImage | 46 +++++++++++++------ client/shared/scripts/restoreDiffImage | 43 ++++++++++++------ 6 files changed, 148 insertions(+), 84 deletions(-) diff --git a/client/engine/Net.lib b/client/engine/Net.lib index 219d6d46..d8f272b1 100755 --- a/client/engine/Net.lib +++ b/client/engine/Net.lib @@ -37,6 +37,9 @@ if [ $# -lt 1 ]; then fi +# Opciones de montaje: lectura o escritura +mount |grep "ogimages.*rw," &>/dev/null && RW=",rw" || RW=",ro" + # Si REPO tomamos el repositorio y la unidad organizativa actual REPO=$(ogGetRepoIp) OGUNIT="$(df | awk -F " " '/ogimages/ {sub("//.*/ogimages","",$1); sub("/","",$1); print $1}')" @@ -53,9 +56,6 @@ umount $OGIMG [ "$2" == "" ] && SRCIMG="ogimages" || SRCIMG="ogimages/$2" eval $(grep "OPTIONS=" /scripts/ogfunctions) -# Opciones de montaje: lectura o escritura -mount |grep "ogimages.*rw," &>/dev/null && RW=",rw" || RW=",ro" - ogEcho session log "$MSG_HELP_ogChangeRepo $NEWREPO ${2%/}" ogConnect $NEWREPO $ogprotocol $SRCIMG $OGIMG $RW diff --git a/client/engine/Rsync.lib b/client/engine/Rsync.lib index 83140419..a68ea382 100755 --- a/client/engine/Rsync.lib +++ b/client/engine/Rsync.lib @@ -318,7 +318,7 @@ IMGLN="ogimg.ln" IMGINFO="ogimg.info" # Copiamos informacion de la imagen a /tmp (para basicas) -[ -r $DEST/$IMGACL ] && cp $DEST/ogimg.* /tmp +[ -r $DEST/$IMGINFO ] && cp $DEST/ogimg.* /tmp #Creamos o modificamos los enlaces. # La imagen diferencial tiene ogimg.ln diff --git a/client/shared/scripts/createBaseImage b/client/shared/scripts/createBaseImage index c367e930..f7ef2a58 100755 --- a/client/shared/scripts/createBaseImage +++ b/client/shared/scripts/createBaseImage @@ -6,7 +6,7 @@ #@brief Se usa como base para el programa de creación de imágenes de OpenGnsys Admin). #@param 1 disco #@param 2 particion -#@param 3 REPO|CACHE +#@param 3 REPO|CACHE|IPREPO #@param 4 imagen #@return #@exception OG_ERR_FORMAT # 1 formato incorrecto. @@ -25,15 +25,18 @@ #@version 1.1.0 - Se muestra el espacio necesario para alojar la imagen y el disponible (ticket #771) #@author Irina Gomez - ETSII Universidad de Sevilla #@date 2017-03-28 +#@version 1.1.1 - Varios repositorios para un mismo cliente (ticket #679). +#@author Irina Gomez - ETSII Universidad de Sevilla +#@date 2018/11/06 #*/ ## -trap "onexit $1 $2 $3 \"$4\"" 1 2 3 6 9 14 15 EXIT +trap "onexit $1 $2 $IMGFILE" 1 2 3 6 9 14 15 EXIT # Si salimos con error demontamos la imagen y desbloqueamos la imagen y la particion function onexit() { local exit_status=$? if [ $exit_status -ne 4 ]; then - ogUnlockImage "$3" "/$4.$IMGEXT" + ogUnlockImage "$IMGFILE" ogUnlock $1 $2 fi exit $exit_status @@ -62,15 +65,26 @@ ogEcho log session "[1] $MSG_SCRIPTS_START $0 $*" # Valores por defecto en etc/engine.cfg IMGEXT=${IMGEXT:-"img"} -REPOIP=$(ogGetRepoIp) - +REPO="${3^^}" +# No permite directorios diferentes para OU +OGUNIT="" + +# Si es una ip y es igual a la del equipo restaura desde cache +[ "$REPO" == "$(ogGetIpAddress)" ] && REPO="CACHE" +# Si es una ip y es distinta a la del recurso samba cambiamos de REPO. +ogCheckIpAddress $REPO +if [ $? == 0 -o $REPO == "REPO" ] ; then + # Si falla el cambio -> salimos con error repositorio no valido + ogChangeRepo $REPO $OGUNIT || exit $(ogRaiseError $OG_ERR_NOTFOUND '$REPO'; echo $?) + REPO="REPO" +fi # Comprobamos si la imagen o la particion estan bloqueada: -ogIsImageLocked "$3" "$4.$IMGEXT" && exit $(ogRaiseError session $OG_ERR_LOCKED "$3 $4.$IMGEXT"; echo $?) +ogIsImageLocked "$REPO" "$4.$IMGEXT" && exit $(ogRaiseError session $OG_ERR_LOCKED "$REPO $4.$IMGEXT"; echo $?) ogIsLocked "$1" "$2" && exit $(ogRaiseError session $OG_ERR_LOCKED "$1 $2"; echo $?) # Si el repositorio es CACHE comprobamos que exista -if [ "$3" == "CACHE" -o "$3" == "cache" ]; then +if [ "$REPO" == "CACHE" -o "$REPO" == "cache" ]; then ! ogFindCache >/dev/null && exit $(ogRaiseError session $OG_ERR_NOTCACHE "CACHE "; echo $?) fi @@ -90,25 +104,25 @@ ORIG=$(ogMount $1 $2) || exit $(ogRaiseError session $OG_ERR_PARTITION "$1 $2" ; ogCleanOs $1 $2 #Comprobar espacio que requerira la imagen para ser almacenada -read SIZEDATA SIZEREQUIRED SIZEFREE ISENOUGHSPACE <<< $(ogGetSizeParameters $1 $2 "$3" "$4" SYNC) +read SIZEDATA SIZEREQUIRED SIZEFREE ISENOUGHSPACE <<< $(ogGetSizeParameters $1 $2 "$REPO" "$4" SYNC) ogEcho log session "[16] $PROG: $MSG_SCRIPTS_CREATE_SIZE $SIZEREQUIRED $SIZEFREE" -[ "$ISENOUGHSPACE" == "TRUE" ] || exit $(ogRaiseError session $OG_ERR_CACHESIZE "$3"; echo $?) +[ "$ISENOUGHSPACE" == "TRUE" ] || exit $(ogRaiseError session $OG_ERR_CACHESIZE "$REPO"; echo $?) -IMGDIR="$(ogGetParentPath "$3" "/$4")" -IMGFILE=${IMGDIR[$3]}/$(basename "/$4").$IMGEXT +IMGDIR="$(ogGetParentPath "$REPO" "/$4")" +IMGFILE=${IMGDIR}/$(basename "/$4").$IMGEXT # Crear la imagen. echo " " > $OGLOGCOMMAND TIME2=$SECONDS -ogEcho log session "[40] $MSG_HELP_ogCreateImage $1 $2 $3 $4 " +ogEcho log session "[40] $MSG_HELP_ogCreateImage $1 $2 $REPO $4 " # Si existe el fichero de la imagen se hace copia de seguridad y se redimensiona, si no existe se crea. # Bloqueo la imagen. Si esta en modo lectura dara error y nos salimos ogEcho log session "[50] $MSG_HELP_ogCreateFileImage." -ogLockImage "$3" "/$4.$IMGEXT" || exit $? -ogCreateFileImage $3 "$4" $IMGEXT $SIZEREQUIRED +ogLockImage "$REPO" "/$4.$IMGEXT" || exit $? +ogCreateFileImage $REPO "$4" $IMGEXT $SIZEREQUIRED # Creamos la lista del contenido y lo situamos en la particion a copiar. ogEcho log session "[60] $MSG_HELP_ogCreateInfoImage" @@ -118,11 +132,11 @@ TIMEAUX3=$[SECONDS-TIME2] ogEcho log session " $MSG_SCRIPTS_TASK_END, $MSG_SCRIPTS_TIME_PARTIAL : $[TIMEAUX3/60]m $[TIMEAUX3%60]s" # Esperamos que el servidor termine de crear y montar la imagen -ogWaitSyncImage "$3" "$4" $IMGEXT "mounted" $SIZEREQUIRED || exit $(ogRaiseError session $OG_ERR_DONTMOUNT_IMAGE "$3 $4 $IMGEXT: time_out."; echo $?) +ogWaitSyncImage "$REPO" "$4" $IMGEXT "mounted" $SIZEREQUIRED || exit $(ogRaiseError session $OG_ERR_DONTMOUNT_IMAGE "$REPO $4 $IMGEXT: time_out."; echo $?) # Sincronizamos los datos de la particion con la imagen. ogEcho log session "[70] $MSG_HELP_ogSyncCreate." -ogSyncCreate $1 $2 $3 "$4" $IMGEXT +ogSyncCreate $1 $2 $REPO "$4" $IMGEXT RETVAL=$? [ $RETVAL == 0 ] || ogEcho session warning "$MSG_ERR_SYNCHRONIZING" @@ -130,16 +144,16 @@ TIMEAUX5=$[SECONDS-TIMEAUX3] ogEcho log session " $MSG_SCRIPTS_TASK_END, $MSG_SCRIPTS_TIME_PARTIAL: $[TIMEAUX5/60]m $[TIMEAUX5%60]s" # Reducimos la imagen: solo para kernel <= 3.7, imagenes con FS ext4. (Desmonta y desbloquea la imagen) -ogEcho log session "[80] $MSG_HELP_ogReduceImage: $3 /$4.$IMGEXT" -ogReduceImage $3 "$4" $IMGEXT +ogEcho log session "[80] $MSG_HELP_ogReduceImage: $REPO /$4.$IMGEXT" +ogReduceImage $REPO "$4" $IMGEXT # Esperamos que el servidor termine de reducir la imagen -ogWaitSyncImage "$3" "$4" $IMGEXT "reduced" $SIZEREQUIRED || exit $(ogRaiseError session $OG_ERR_DONTMOUNT_IMAGE "$3 $4 $IMGEXT: time_out."; echo $?) +ogWaitSyncImage "$REPO" "$4" $IMGEXT "reduced" $SIZEREQUIRED || exit $(ogRaiseError session $OG_ERR_DONTMOUNT_IMAGE "$REPO $4 $IMGEXT: time_out."; echo $?) echo " " > $OGLOGCOMMAND sleep 2 # Comprobamos que la imagen esta bien detectacdo que es un sistema de ficheros. ogEcho log session "[95] $MSG_HELP_ogCheckSyncImage" -ogCheckSyncImage $3 "$4" "img" || exit $(ogRaiseError session $OG_ERR_IMAGE "$3 $4 img" ; echo $?) +ogCheckSyncImage $REPO "$4" "img" || exit $(ogRaiseError session $OG_ERR_IMAGE "$REPO $4 img" ; echo $?) #resumen de la operacion IMGSIZE=$(ls -l --block-size=1024 "$IMGFILE" | cut -f5 -d" ") diff --git a/client/shared/scripts/createDiffImage b/client/shared/scripts/createDiffImage index 79ee9726..ddee5c7b 100755 --- a/client/shared/scripts/createDiffImage +++ b/client/shared/scripts/createDiffImage @@ -28,16 +28,19 @@ #@version 1.1.0 - Se muestra el espacio necesario para alojar la imagen y el disponible (ticket #771) #@author Irina Gomez - ETSII Universidad de Sevilla #@date 2017-03-28 +#@version 1.1.1 - Varios repositorios para un mismo cliente (ticket #679). +#@author Irina Gomez - ETSII Universidad de Sevilla +#@date 2018/11/06 #*/ ## -trap "onexit $1 $2 $3 \"$4\" \"$5\"" 1 2 3 6 9 14 15 EXIT +trap "onexit $1 $2 \"$4\" \"$5\"" 1 2 3 6 9 14 15 EXIT function onexit() { local exit_status=$? - ogUnmountImage $3 "$5" $DIFFTYPE &>/dev/null - ogUnmountImage $3 "$4" $IMGEXT &>/dev/null + ogUnmountImage $REPO "$5" $DIFFTYPE &>/dev/null + ogUnmountImage $REPO "$3" $IMGEXT &>/dev/null if [ $exit_status -ne 4 ]; then - ogUnlockImage "$3" "/$4.$IMGEXT" &>/dev/null - ogUnlockImage "$3" "/$5.$DIFFEXT" &>/dev/null + ogUnlockImage "$IMGFILE" &>/dev/null + ogUnlockImage "$DIFFFILE" &>/dev/null ogUnlock $1 $2 &>/dev/null fi exit $exit_status @@ -59,33 +62,45 @@ fi [ $# -lt 5 ] && exit $(ogRaiseError session $OG_ERR_FORMAT "$MSG_FORMAT: $PROG ndisco nparticion REPO|CACHE base_image diff_image"; echo $?) -# Valores por defecto en etc/engine.cfg -IMGEXT="img" -DIFFEXT="img.diff" -DIFFTYPE="diff" -REPOIP=$(ogGetRepoIp) - # Limpiamos los archivo de log echo -n "" >$OGLOGCOMMAND [ "$(ogGetCaller)" == "RestaurarSoftIncremental" ] || echo -n "" > $OGLOGSESSION ogEcho log session "[1] $MSG_SCRIPTS_START $0 $*" +# Valores por defecto en etc/engine.cfg +IMGEXT="img" +DIFFEXT="img.diff" +DIFFTYPE="diff" +REPO="${3^^}" +# No permite directorios diferentes para OU +OGUNIT="" + +# Si es una ip y es igual a la del equipo restaura desde cache +[ "$REPO" == "$(ogGetIpAddress)" ] && REPO="CACHE" +# Si es una ip y es distinta a la del recurso samba cambiamos de REPO. +ogCheckIpAddress $REPO +if [ $? == 0 -o $REPO == "REPO" ] ; then + # Si falla el cambio -> salimos con error repositorio no valido + ogChangeRepo $REPO $OGUNIT || exit $(ogRaiseError $OG_ERR_NOTFOUND '$REPO'; echo $?) + REPO="REPO" +fi + # Comprobamos si la imagen diferencial o la particion estan bloqueada: -ogIsImageLocked "$3" "$5.$DIFFEXT" && exit $(ogRaiseError session $OG_ERR_LOCKED "$3 $5.$DIFFEXT"; echo $?) +ogIsImageLocked "$REPO" "$5.$DIFFEXT" && exit $(ogRaiseError session $OG_ERR_LOCKED "$REPO $5.$DIFFEXT"; echo $?) ogIsLocked "$1" "$2" && exit $(ogRaiseError session $OG_ERR_LOCKED "$1 $2"; echo $?) # Comprobar si la imagen completa existe. -IMGFILE="$(ogGetPath "$3" "$4.$IMGEXT")" -[ -n "$IMGFILE" ] || exit $(ogRaiseError session $OG_ERR_NOTFOUND "$3 $4.$IMGEXT"; echo $?) +IMGFILE="$(ogGetPath "$REPO" "$4.$IMGEXT")" +[ -n "$IMGFILE" ] || exit $(ogRaiseError session $OG_ERR_NOTFOUND "$REPO $4.$IMGEXT"; echo $?) # Comprobar que la imagen completa es sincronizable -ogIsSyncImage "$3" "$4" "img" || exit $(ogRaiseError session $OG_ERR_DONTSYNC_IMAGE "$3 $4"; echo $?) +ogIsSyncImage "$REPO" "$4" "img" || exit $(ogRaiseError session $OG_ERR_DONTSYNC_IMAGE "$REPO $4"; echo $?) # Comprobar que no está bloqueada -ogIsImageLocked "$3" "$4.$IMGEXT" && exit $(ogRaiseError session $OG_ERR_LOCKED "$3 $4.$IMGEXT"; echo $?) +ogIsImageLocked "$REPO" "$4.$IMGEXT" && exit $(ogRaiseError session $OG_ERR_LOCKED "$REPO $4.$IMGEXT"; echo $?) # Si el repositorio es CACHE comprobamos que exista -if [ "$3" == "CACHE" -o "$3" == "cache" ]; then +if [ "$REPO" == "CACHE" -o "$REPO" == "cache" ]; then ! ogFindCache >/dev/null && exit $(ogRaiseError session $OG_ERR_NOTCACHE "CACHE "; echo $?) fi @@ -96,12 +111,12 @@ PART=$(ogDiskToDev "$1" "$2" 2>/dev/null) || exit $(ogRaiseError session $OG_ERR #Comprobamos que la partición se puede montar. ORIG=$(ogMount $1 $2) || exit $(ogRaiseError session $OG_ERR_PARTITION "$1 $2"; echo $?) -DIFFDIR="$(ogGetParentPath "$3" "/$5")" +DIFFDIR="$(ogGetParentPath "$REPO" "/$5")" DIFFFILE="$DIFFDIR/$5.$DIFFEXT" # Bloqueo las imagenes -> Si no hay acceso de escritura dara error y nos saldremos. -ogLockImage "$3" "/$4.$IMGEXT" || exit $? -ogLockImage "$3" "/$5.$DIFFEXT" || exit $? +ogLockImage "$REPO" "/$4.$IMGEXT" || exit $? +ogLockImage "$REPO" "/$5.$DIFFEXT" || exit $? # Comprobar consistencia del sistema de archivos. echo " " > $OGLOGCOMMAND @@ -116,25 +131,25 @@ ogCleanOs $1 $2 # Crear la imagen. echo " " > $OGLOGCOMMAND TIME2=$SECONDS -ogEcho log session "[40] $MSG_HELP_createDiffImage: $1 $2 $3 $4" +ogEcho log session "[40] $MSG_HELP_createDiffImage: $1 $2 $REPO $4" # Creamos la lista del contenido y lo situamos en la particion a copiar. # Montamos imagen completa (con la que vamos a comparar) -ogMountImage $3 "$4" $IMGEXT >/dev/null +ogMountImage $REPO "$4" $IMGEXT >/dev/null # Comprobar que la imagen completa se ha montado -ogWaitSyncImage $3 "$4" $IMGEXT "mounted" || exit $(ogRaiseError session $OG_ERR_DONTMOUNT_IMAGE "$3 $4 $IMGEXT: time_out."; echo $?) +ogWaitSyncImage $REPO "$4" $IMGEXT "mounted" || exit $(ogRaiseError session $OG_ERR_DONTMOUNT_IMAGE "$REPO $4 $IMGEXT: time_out."; echo $?) # Creamos la informacion de la imagen. ogEcho log session "[45] $MSG_HELP_ogCreateInfoImage " -ogCreateInfoImage $1 $2 $3 "$4" "${DIFFTYPE}" +ogCreateInfoImage $1 $2 $REPO "$4" "${DIFFTYPE}" [ $? -eq $OG_ERR_NOTDIFFERENT ] && exit $(ogRaiseError session $OG_ERR_NOTDIFFERENT; echo $?) #Comprobar espacio que requerira la imagen para ser almacenada -read SIZEDATA SIZEREQUIRED SIZEFREE ISENOUGHSPACE <<< $(ogGetSizeParameters $1 $2 "$3" "$5" DIFF) +read SIZEDATA SIZEREQUIRED SIZEFREE ISENOUGHSPACE <<< $(ogGetSizeParameters $1 $2 "$REPO" "$5" DIFF) ogEcho log session "[50] $PROG: $MSG_SCRIPTS_CREATE_SIZE $SIZEREQUIRED $SIZEFREE" -[ "$ISENOUGHSPACE" == "TRUE" ] || exit $(ogRaiseError session $OG_ERR_CACHESIZE "$3"; echo $?) +[ "$ISENOUGHSPACE" == "TRUE" ] || exit $(ogRaiseError session $OG_ERR_CACHESIZE "$REPO"; echo $?) #Calculamos el tamaño de la imagen: ogMount $1 $2 >/dev/null @@ -150,31 +165,31 @@ sed -i s/SIZEDATA/"$SIZEDATA"/g /tmp/ogimg.info # Creamos o redimensionamos la imagen ogEcho log session "[60] $MSG_HELP_ogCreateFileImage." -ogCreateFileImage $3 "$5" $DIFFTYPE $SIZEREQUIRED +ogCreateFileImage $REPO "$5" $DIFFTYPE $SIZEREQUIRED # Esperamos que se monte la imagen despues de crarla en el servidor -ogWaitSyncImage "$3" "$5" "$DIFFTYPE" "mounted" $SIZEREQUIRED || exit $(ogRaiseError session $OG_ERR_DONTMOUNT_IMAGE "$3 $5 $DIFFTYPE: time_out."; echo $?) +ogWaitSyncImage "$REPO" "$5" "$DIFFTYPE" "mounted" $SIZEREQUIRED || exit $(ogRaiseError session $OG_ERR_DONTMOUNT_IMAGE "$REPO $5 $DIFFTYPE: time_out."; echo $?) ogEcho log session "[70] $MSG_HELP_ogSyncCreate" # Copio los datos a la imagen diferecial : -ogSyncCreate $1 $2 $3 "$5" $DIFFTYPE +ogSyncCreate $1 $2 $REPO "$5" $DIFFTYPE RETVAL=$? [ $RETVAL == 0 ] || ogEcho session warning "$MSG_ERR_SYNCHRONIZING" TIMEAUX6=$[SECONDS-TIMEAUX5] ogEcho log session " $MSG_SCRIPTS_TASK_END, $MSG_SCRIPTS_TIME_PARTIAL: $[TIMEAUX6/60]m $[TIMEAUX6%60]s" # Reducimos la imagen diferencial -> solo para kernel <= 3.7, imagenes con FS ext4 -ogEcho log session "[80] $MSG_HELP_ogReduceImage: $3 /$4.$IMGEXT" -ogReduceImage $3 "$5" $DIFFTYPE +ogEcho log session "[80] $MSG_HELP_ogReduceImage: $REPO /$4.$IMGEXT" +ogReduceImage $REPO "$5" $DIFFTYPE # Esperamos que el servidor termine de reducir la imagen -ogWaitSyncImage "$3" "$5" $DIFFTYPE "reduced" $SIZEREQUIRED || exit $(ogRaiseError session $OG_ERR_DONTMOUNT_IMAGE "$3 $4 $IMGEXT: time_out."; echo $?) +ogWaitSyncImage "$REPO" "$5" $DIFFTYPE "reduced" $SIZEREQUIRED || exit $(ogRaiseError session $OG_ERR_DONTMOUNT_IMAGE "$REPO $4 $IMGEXT: time_out."; echo $?) # TODO: necesaria funcion que espere a que se reduzca la imagen para continuar el script echo " " > $OGLOGCOMMAND sleep 2 # Comprobamos que la imagen esta bien ogEcho log session "[95] $MSG_HELP_ogCheckSyncImage" -ogCheckSyncImage $3 "$5" diff || exit $(ogRaiseError session $OG_ERR_IMAGE "$3 $5 diff"; echo $?) +ogCheckSyncImage $REPO "$5" diff || exit $(ogRaiseError session $OG_ERR_IMAGE "$REPO $5 diff"; echo $?) #resumen de la operacion IMGSIZE=$(ls -l --block-size=1024 "${DIFFFILE}"| cut -f5 -d" ") diff --git a/client/shared/scripts/restoreBaseImage b/client/shared/scripts/restoreBaseImage index 0b291518..046c4658 100755 --- a/client/shared/scripts/restoreBaseImage +++ b/client/shared/scripts/restoreBaseImage @@ -3,7 +3,7 @@ # restoreBaseImage #@brief Script de ejemplo para restaurar una imagen #@brief Se usa como base para el programa de restauración de imágenes de OpenGnsys Admin). -#@param 1 REPO|CACHE +#@param 1 REPO|CACHE|IPREPO #@param 2 imagen #@param 3 disco #@param 4 particion @@ -22,14 +22,17 @@ #@version 1.0 - restauración de imagen con sincronizacion. #@author #@date 2012-12-04 +#@version 1.1.1 - Varios repositorios para un mismo cliente (ticket #679). +#@author Irina Gomez - ETSII Universidad de Sevilla +#@date 2018/11/06 #*/ ## -trap "onexit $1 \"$2\" $3 $4" 1 2 3 6 9 14 15 EXIT +trap "onexit $REPO \"$2\" $3 $4" 1 2 3 6 9 14 15 EXIT # Si salimos con error demontamos la imagen y desbloqueamos la imagen y la particion function onexit() { local exit_status=$? - ogUnmountImage "$1" "$2" "$IMGEXT" &>/dev/null + ogUnmountImage "$REPO" "$2" "$IMGEXT" &>/dev/null [ $exit_status -ne 4 ] && ogUnlock $3 $4 &>/dev/null exit $exit_status } @@ -54,6 +57,21 @@ fi [ $# -lt 4 ] && exit $(ogRaiseError session $OG_ERR_FORMAT "$MSG_FORMAT: $PROG REPO|CACHE imagen ndisco nparticion [ UNICAST|MULTICAST|TORRENT ] [opciones protocolo]"; echo $?) +# Procesar parámetros de entrada +REPO="${1^^}" +# No permite directorios diferentes para OU +OGUNIT="" + +# Si es una ip y es igual a la del equipo restaura desde cache +[ "$REPO" == "$(ogGetIpAddress)" ] && REPO="CACHE" +# Si es una ip y es distinta a la del recurso samba cambiamos de REPO. +ogCheckIpAddress $REPO +if [ $? == 0 -o $REPO == "REPO" ] ; then + # Si falla el cambio -> salimos con error repositorio no valido + ogChangeRepo $REPO ${OGUNIT%/} || exit $(ogRaiseError $OG_ERR_NOTFOUND '$REPO $OGUNIT'; echo $?) + REPO="REPO" +fi + # Carga del configurador del engine [ -z $OGENGINECONFIGURATE ] && source /opt/opengnsys/etc/engine.cfg @@ -62,17 +80,17 @@ REPOFILE="$(ogGetPath "REPO" "$2.$IMGEXT")" [ -n "$REPOFILE" ] || exit $(ogRaiseError session $OG_ERR_NOTFOUND "REPO, $2.$IMGEXT"; echo $?) # Comprobar que es sincronizable (con REPO) -ogIsSyncImage REPO "$2" $IMGEXT || exit $(ogRaiseError session $OG_ERR_DONTSYNC_IMAGE "$1 $2"; echo $?) +ogIsSyncImage REPO "$2" $IMGEXT || exit $(ogRaiseError session $OG_ERR_DONTSYNC_IMAGE "$REPO $2"; echo $?) IMGEXT="img" # Comprobamos si la imagen o la particion estan bloqueada: -ogIsImageLocked "REPO" "$2.$IMGEXT" && exit $(ogRaiseError session $OG_ERR_LOCKED "$1 $2.$IMGEXT"; echo $?) +ogIsImageLocked "REPO" "$2.$IMGEXT" && exit $(ogRaiseError session $OG_ERR_LOCKED "$REPO $2.$IMGEXT"; echo $?) ogIsLocked "$3" "$4" && exit $(ogRaiseError session $OG_ERR_LOCKED "$3 $4"; echo $?) # Detectamos el sistema de ficheros de la imagen # TODO ogGetImageInfo DIRMOUNT=$(ogMountImage "REPO" "$2") -ogWaitSyncImage "REPO" "$2" "$IMGEXT" "mounted" || exit $(ogRaiseError session $OG_ERR_DONTMOUNT_IMAGE "$1 $2 $IMGEXT: time_out."; echo $?) +ogWaitSyncImage "REPO" "$2" "$IMGEXT" "mounted" || exit $(ogRaiseError session $OG_ERR_DONTMOUNT_IMAGE "$REPO $2 $IMGEXT: time_out."; echo $?) IMGFSTYPE=$(head -1 $DIRMOUNT/ogimg.info |cut -d: -f3) # Comprobamos si el sistema de ficheros se puede montar @@ -89,7 +107,7 @@ fi PROTO=${5:-"UNICAST"} -if [ "$1" == "CACHE" -o "$1" == "cache" ]; then +if [ "$REPO" == "CACHE" -o "$REPO" == "cache" ]; then # Las imagenes sincronizables aunque sean iguales no tienen el mismo sum. # Sincronizamos si existe el fichero y si no usamos updateCache. ogEcho log session "[10] $MSG_SCRIPTS_TASK_START updateCache REPO $2.$IMGEXT $PROTO $6" @@ -107,20 +125,20 @@ if [ "$1" == "CACHE" -o "$1" == "cache" ]; then ogEcho log session " $MSG_SCRIPTS_TASK_END, $MSG_SCRIPTS_TIME_PARTIAL : $[TIMEAUX1/60]m $[TIMEAUX1%60]s" # Montamos la imagen de cache - ogMountImage "$1" "$2" >/dev/null - ogWaitSyncImage "$1" "$2" "$IMGEXT" "mounted" || exit $(ogRaiseError session $OG_ERR_DONTMOUNT_IMAGE "$1 $2 $IMGEXT: time_out."; echo $?) + ogMountImage "$REPO" "$2" >/dev/null + ogWaitSyncImage "$REPO" "$2" "$IMGEXT" "mounted" || exit $(ogRaiseError session $OG_ERR_DONTMOUNT_IMAGE "$REPO $2 $IMGEXT: time_out."; echo $?) fi TIME2=$SECONDS # Restaurar la imagen. -ogEcho log session "[40] $MSG_HELP_ogRestoreImage: $1 $2 $3 $4" +ogEcho log session "[40] $MSG_HELP_ogRestoreImage: $REPO $2 $3 $4" ogLock $3 $4 # Sincronizamos la partición con la imagen. -ogEcho log session "[60] $MSG_HELP_ogSyncRestore: $1 $2 $IMGEXT $3 $4" -ogSyncRestore "$1" "$2" "$IMGEXT" $3 $4 +ogEcho log session "[60] $MSG_HELP_ogSyncRestore: $REPO $2 $IMGEXT $3 $4" +ogSyncRestore "$REPO" "$2" "$IMGEXT" $3 $4 RETVAL=$? [ $RETVAL == 0 ] || ogEcho session warning "$MSG_ERR_SYNCHRONIZING" @@ -128,7 +146,7 @@ TIMEAUX2=$[SECONDS-TIME2] ogEcho log session " $MSG_SCRIPTS_TASK_END, $MSG_SCRIPTS_TIME_PARTIAL : $[TIMEAUX2/60]m $[TIMEAUX2%60]s" # Desmontamos imagen basica. -ogUnmountImage "$1" "$2" "$IMGEXT" +ogUnmountImage "$REPO" "$2" "$IMGEXT" # Restableciendo acl ogUnlock $3 $4 @@ -141,7 +159,7 @@ if [ "$(ogGetCaller)" != "restoreDiffImage" ];then ogExecAndLog command ogRestoreAclImage $3 $4 if which configureOsCustom &>/dev/null; then ogEcho log session "[90] configureOsCustom" - configureOsCustom "$3" "$4" "$1" "$2" + configureOsCustom "$3" "$4" "$REPO" "$2" else ogEcho log session "[90] $MSG_HELP_configureOs" configureOs $3 $4 diff --git a/client/shared/scripts/restoreDiffImage b/client/shared/scripts/restoreDiffImage index 7d16ef90..4de5f31a 100755 --- a/client/shared/scripts/restoreDiffImage +++ b/client/shared/scripts/restoreDiffImage @@ -24,14 +24,17 @@ #@version 1.0 - restauración de imagen con sincronizacion. #@author #@date 2012-12-04 +#@version 1.1.1 - Varios repositorios para un mismo cliente (ticket #679). +#@author Irina Gomez - ETSII Universidad de Sevilla +#@date 2018/11/06 #*/ ## -trap "onexit $1 \"$2\" \"$3\" $4 $5" 1 2 3 6 9 14 15 EXIT +trap "onexit $REPO \"$2\" \"$3\" $4 $5" 1 2 3 6 9 14 15 EXIT # Si salimos con error demontamos la imagen y desbloqueamos la imagen y la particion function onexit() { local exit_status=$? - ogUnmountImage "$1" "$3" "$DIFFTYPE" &>/dev/null + ogUnmountImage "$REPO" "$3" "$DIFFTYPE" &>/dev/null [ $exit_status -ne 4 ] && ogUnlock $4 $5 &>/dev/null exit $exit_status } @@ -59,27 +62,41 @@ ogEcho log session "[1] $MSG_SCRIPTS_START $0 $*" # Procesar parámetros de entrada DIFFTYPE="diff" DIFFEXT="img.diff" +REPO="${1^^}" +# No permite directorios diferentes para OU +OGUNIT="" + +# Si es una ip y es igual a la del equipo restaura desde cache +[ "$REPO" == "$(ogGetIpAddress)" ] && REPO="CACHE" +# Si es una ip y es distinta a la del recurso samba cambiamos de REPO. +ogCheckIpAddress $REPO +if [ $? == 0 -o $REPO == "REPO" ] ; then + # Si falla el cambio -> salimos con error repositorio no valido + ogChangeRepo $REPO ${OGUNIT%/} || exit $(ogRaiseError $OG_ERR_NOTFOUND '$REPO $OGUNIT'; echo $?) + REPO="REPO" +fi + REPODIFFFILE="$(ogGetPath "REPO" "$3.$DIFFEXT")" [ -n "$REPODIFFFILE" ] || exit $(ogRaiseError session $OG_ERR_NOTFOUND "REPO $3.$DIFFEXT";echo $?) # Comprobamos si la imagen o la particion estan bloqueada: -ogIsImageLocked "$1" "$3.$DIFFEXT" && exit $(ogRaiseError session $OG_ERR_LOCKED "$1 $3.$DIFFEXT";echo $?) +ogIsImageLocked "$REPO" "$3.$DIFFEXT" && exit $(ogRaiseError session $OG_ERR_LOCKED "$REPO $3.$DIFFEXT";echo $?) ogIsLocked "$4" "$5" && exit $(ogRaiseError session $OG_ERR_LOCKED "$4 $5";echo $?) -PART=$(ogDiskToDev "$4" "$5" 2>/dev/null ) || exit $(ogRaiseError session $OG_ERR_PARTITION "$1 $3";echo $?) +PART=$(ogDiskToDev "$4" "$5" 2>/dev/null ) || exit $(ogRaiseError session $OG_ERR_PARTITION "$REPO $3";echo $?) # Carga del configurador del engine [ -z $OGENGINECONFIGURATE ] && source /opt/opengnsys/etc/engine.cfg # Comprobar que es sincronizable -ogIsSyncImage REPO "$3" diff || exit $(ogRaiseError session $OG_ERR_DONTSYNC_IMAGE "$1 $3";echo $?) +ogIsSyncImage REPO "$3" diff || exit $(ogRaiseError session $OG_ERR_DONTSYNC_IMAGE "$REPO $3";echo $?) # Restauramos la imagen Basica. -restoreBaseImage $1 "$2" "$4" "$5" "$6" "$7" +restoreBaseImage $REPO "$2" "$4" "$5" "$6" "$7" PROTO=${6:-"UNICAST"} -if [ "$1" == "CACHE" -o "$1" == "cache" ]; then +if [ "$REPO" == "CACHE" -o "$REPO" == "cache" ]; then ogEcho log session "[10] $MSG_HELP_updateCache." ogEcho log session " updateCache REPO" "/$3.$DIFFEXT" "$PROTO" "$7" updateCache REPO "/$3.$DIFFEXT" "$PROTO" "$7" @@ -101,20 +118,20 @@ TIME2=$SECONDS ogEcho log session "[40] $MSG_RESTORE $PART" # Montamos la diferencial -ogMountImage "$1" "$3" "$DIFFTYPE" &>/dev/null +ogMountImage "$REPO" "$3" "$DIFFTYPE" &>/dev/null # Comprobar que la imagen diferencial se ha montado -ogWaitSyncImage "$1" "$3" "$DIFFTYPE" "mounted" || exit $(ogRaiseError session $OG_ERR_DONTMOUNT_IMAGE "$1 $3 $DIFFTYPE: time_out $TIMEAUX seg.";echo $?) +ogWaitSyncImage "$REPO" "$3" "$DIFFTYPE" "mounted" || exit $(ogRaiseError session $OG_ERR_DONTMOUNT_IMAGE "$REPO $3 $DIFFTYPE: time_out $TIMEAUX seg.";echo $?) ogMount $4 $5 >/dev/null ogLock $4 $5 # Sincronizamos la partición con la imagen. -ogEcho log session "[60] $MSG_HELP_ogSyncRestore: $1 $3 $DIFFTYPE $4 $5" -ogSyncRestore "$1" "$3" "$DIFFTYPE" $4 $5 +ogEcho log session "[60] $MSG_HELP_ogSyncRestore: $REPO $3 $DIFFTYPE $4 $5" +ogSyncRestore "$REPO" "$3" "$DIFFTYPE" $4 $5 RETVAL=$? [ $RETVAL == 0 ] || ogEcho session warning "$MSG_ERR_SYNCHRONIZING" # Desmontamos la imagen -ogUnmountImage "$1" "$3" "$DIFFTYPE" +ogUnmountImage "$REPO" "$3" "$DIFFTYPE" ogUnlock $4 $5 TIMEAUX2=$[SECONDS-TIME2] @@ -130,7 +147,7 @@ ogEcho log session " $MSG_SCRIPTS_TASK_END, $MSG_SCRIPTS_TIME_PARTIAL : $[T # Llamar al script de post-configuración del sistema operativo. if which configureOsCustom &>/dev/null; then ogEcho log session "[90] configureOsCustom" - configureOsCustom "$4" "$5" "$1" "$2" + configureOsCustom "$4" "$5" "$REPO" "$2" else ogEcho log session "[90] $MSG_HELP_configureOs." configureOs $4 $5 -- cgit v1.2.3-18-g5258 From b351d8afce7769df7e57c13c88efc3b1346d031e Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Wed, 14 Nov 2018 18:40:06 +0100 Subject: #875: Removing old ogAdmRepo service. --- admin/Sources/Services/ogAdmRepo/Makefile | 44 ----- admin/Sources/Services/ogAdmRepo/ogAdmRepo.cfg | 3 - .../Services/ogAdmRepo/sources/ogAdmRepo.cpp | 177 --------------------- .../Sources/Services/ogAdmRepo/sources/ogAdmRepo.h | 41 ----- admin/Sources/Services/opengnsys.default | 7 +- admin/Sources/Services/opengnsys.init | 17 +- installer/opengnsys_installer.sh | 11 +- installer/opengnsys_update.sh | 12 +- repoman/bin/opengnsys.cron | 5 - repoman/etc/logrotate.tmpl | 2 +- repoman/etc/ogAdmRepo.cfg.tmpl | 2 + server/etc/logrotate.tmpl | 2 +- server/lib/security-config | 5 - 13 files changed, 14 insertions(+), 314 deletions(-) delete mode 100644 admin/Sources/Services/ogAdmRepo/Makefile delete mode 100644 admin/Sources/Services/ogAdmRepo/ogAdmRepo.cfg delete mode 100644 admin/Sources/Services/ogAdmRepo/sources/ogAdmRepo.cpp delete mode 100644 admin/Sources/Services/ogAdmRepo/sources/ogAdmRepo.h create mode 100644 repoman/etc/ogAdmRepo.cfg.tmpl diff --git a/admin/Sources/Services/ogAdmRepo/Makefile b/admin/Sources/Services/ogAdmRepo/Makefile deleted file mode 100644 index d7b3591d..00000000 --- a/admin/Sources/Services/ogAdmRepo/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# makefile - -# Nombre del proyecto -PROYECTO := ogAdmRepo - -#Directorio de instalación -INSTALL_DIR := /opt/opengnsys - -# Opciones de compilacion -CFLAGS := $(shell mysql_config --cflags) -CFLAGS += -O0 -g -Wall -I../../Includes # Depuracion -#CFLAGS += -O3 -I../../Includes # Optimizacion -CPPFLAGS := $(CFLAGS) - -# Opciones de linkado -LDFLAGS := -Wl,--no-as-needed $(shell mysql_config --libs) -lpthread - -# Ficheros objetos -OBJS := ../../Includes/Database.o sources/ogAdmRepo.o - - -all: $(PROYECTO) - -$(PROYECTO): $(OBJS) - g++ $(LDFLAGS) $(OBJS) -o $(PROYECTO) -# strip $(PROYECTO) # Optimizacion - -install: $(PROYECTO) - cp $(PROYECTO) $(INSTALL_DIR)/sbin - cp $(PROYECTO).cfg $(INSTALL_DIR)/etc - -clean: - rm -f $(PROYECTO) $(OBJS) - -uninstall: clean - rm -f /usr/local/sbin/$(PROYECTO) /usr/local/etc/$(PROYECTO).cfg - -sources/%.o: sources/%.cpp - g++ $(CPPFLAGS) -c -o"$@" "$<" - -sources/%.o: sources/%.c - gcc $(CFLAGS) -c -o"$@" "$<" - - diff --git a/admin/Sources/Services/ogAdmRepo/ogAdmRepo.cfg b/admin/Sources/Services/ogAdmRepo/ogAdmRepo.cfg deleted file mode 100644 index 1a8f289d..00000000 --- a/admin/Sources/Services/ogAdmRepo/ogAdmRepo.cfg +++ /dev/null @@ -1,3 +0,0 @@ -IPlocal=SERVERIP -Puerto=2002 -ApiToken=REPOKEY diff --git a/admin/Sources/Services/ogAdmRepo/sources/ogAdmRepo.cpp b/admin/Sources/Services/ogAdmRepo/sources/ogAdmRepo.cpp deleted file mode 100644 index 067b6af0..00000000 --- a/admin/Sources/Services/ogAdmRepo/sources/ogAdmRepo.cpp +++ /dev/null @@ -1,177 +0,0 @@ -// ******************************************************************************************************** -// Servicio: ogAdmRepo -// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla -// Fecha Creación: Marzo-2010 -// Fecha Última modificación: Marzo-2010 -// Nombre del fichero: ogAdmRepo.cpp -// Descripción :Este fichero implementa el servicio de administración general del sistema -// ******************************************************************************************************** -#include "ogAdmRepo.h" -#include "ogAdmLib.c" -//________________________________________________________________________________________________________ -// Función: tomaConfiguracion -// -// Descripción: -// Lee el fichero de configuración del servicio -// Parámetros: -// filecfg : Ruta completa al fichero de configuración -// Devuelve: -// TRUE: Si el proceso es correcto -// FALSE: En caso de ocurrir algún error -//________________________________________________________________________________________________________ -BOOLEAN tomaConfiguracion(char* filecfg) { - char modulo[] = "tomaConfiguracion()"; - - if (filecfg == NULL || strlen(filecfg) == 0) { - errorLog(modulo, 1, FALSE); // Fichero de configuración del servicio vacío - return (FALSE); - } - FILE *fcfg; - long lSize; - char * buffer, *lineas[MAXPRM], *dualparametro[2]; - int i, numlin, resul; - - fcfg = fopen(filecfg, "rt"); - if (fcfg == NULL) { - errorLog(modulo, 2, FALSE); // No existe fichero de configuración del servicio - return (FALSE); - } - - fseek(fcfg, 0, SEEK_END); - lSize = ftell(fcfg); // Obtiene tamaño del fichero. - rewind(fcfg); - buffer = (char*) reservaMemoria(lSize+1); // Toma memoria para el buffer de lectura. - if (buffer == NULL) { // No hay memoria suficiente para el buffer - errorLog(modulo, 3, FALSE); - return (FALSE); - } - fread(buffer, 1, lSize, fcfg); // Lee contenido del fichero - buffer[lSize]=(char) NULL; - fclose(fcfg); - - iplocal[0] = (char) NULL; //inicializar variables globales - puerto[0] = (char) NULL; - - numlin = splitCadena(lineas, buffer, '\n'); - for (i = 0; i < numlin; i++) { - splitCadena(dualparametro, lineas[i], '='); - resul = strcmp(StrToUpper(dualparametro[0]), "IPLOCAL"); - if (resul == 0) - strcpy(iplocal, dualparametro[1]); - resul = strcmp(StrToUpper(dualparametro[0]), "PUERTO"); - if (resul == 0) - strcpy(puerto, dualparametro[1]); - } - if (iplocal[0] == (char) NULL) { - errorLog(modulo, 4, FALSE); // Falta parámetro IPLOCAL - return (FALSE); - } - if (puerto[0] == (char) NULL) { - errorLog(modulo, 5, FALSE); // Falta parámetro PUERTO - return (FALSE); - } - return (TRUE); -} -// ________________________________________________________________________________________________________ -// Función: gestionaTrama -// -// Descripción: -// Procesa las tramas recibidas . -// Parametros: -// - s : Socket usado para comunicaciones -// Devuelve: -// TRUE: Si el proceso es correcto -// FALSE: En caso de ocurrir algún error -// ________________________________________________________________________________________________________ -BOOLEAN gestionaTrama(SOCKET *socket_c) -{ - TRAMA* ptrTrama; - int i, res; - char *nfn; - char modulo[] = "gestionaTrama()"; - - ptrTrama=recibeTrama(socket_c); - if (ptrTrama){ - INTROaFINCAD(ptrTrama); - nfn = copiaParametro("nfn",ptrTrama); // Toma dirección/es IP - for (i = 0; i < MAXIMAS_FUNCIONES; i++) { // Recorre funciones que procesan las tramas - res = strcmp(tbfuncionesRepo[i].nf, nfn); - if (res == 0) { // Encontrada la función que procesa el mensaje - return (tbfuncionesRepo[i].fptr(socket_c, ptrTrama)); // Invoca la función - } - } - } - else - errorLog(modulo, 17, FALSE); // Error en la recepción - return (TRUE); -} -// ******************************************************************************************************** -// PROGRAMA PRINCIPAL (SERVICIO) -// ******************************************************************************************************** -int main(int argc, char *argv[]) -{ - SOCKET socket_r; // Socket donde escucha el servidor - SOCKET socket_c; // Socket de los clientes que se conectan - socklen_t iAddrSize; - struct sockaddr_in local, cliente; - char modulo[] = "main()"; - - /*-------------------------------------------------------------------------------------------------------- - Validación de parámetros de ejecución y lectura del fichero de configuración del servicio - ---------------------------------------------------------------------------------------------------------*/ - if (!validacionParametros(argc, argv,1)) // Valida parámetros de ejecución - exit(EXIT_FAILURE); - - if (!tomaConfiguracion(szPathFileCfg)) { // Toma parametros de configuracion - exit(EXIT_FAILURE); - } - /*-------------------------------------------------------------------------------------------------------- - Carga del catálogo de funciones que procesan las tramas (referencia directa por puntero a función) - ---------------------------------------------------------------------------------------------------------*/ - int cf = 0; - - cf++; - - - /*-------------------------------------------------------------------------------------------------------- - Creación y configuración del socket del servicio - ---------------------------------------------------------------------------------------------------------*/ - socket_r = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); // Crea socket del servicio - if (socket_r == SOCKET_ERROR) { // Error al crear el socket del servicio - errorLog(modulo, 13, TRUE); - exit(EXIT_FAILURE); - } - - local.sin_addr.s_addr = htonl(INADDR_ANY); // Configura el socket del servicio - local.sin_family = AF_INET; - local.sin_port = htons(atoi(puerto)); - - if (bind(socket_r, (struct sockaddr *) &local, sizeof(local))== SOCKET_ERROR) { // Enlaza socket - errorLog(modulo, 14, TRUE); - exit(EXIT_FAILURE); - } - - listen(socket_r, 250); // Pone a escuchar al socket - iAddrSize = sizeof(cliente); - /*-------------------------------------------------------------------------------------------------------- - Bucle para acceptar conexiones - ---------------------------------------------------------------------------------------------------------*/ - infoLog(1); // Inicio de sesión - while(TRUE) { - socket_c = accept(socket_r, (struct sockaddr *) &cliente, &iAddrSize); - if (socket_c == INVALID_SOCKET) { - errorLog(modulo, 15, TRUE); - exit(EXIT_FAILURE); - } - if(!gestionaTrama(&socket_c)){ - errorLog(modulo, 39, TRUE); - break; - } - close(socket_c); - } - /*-------------------------------------------------------------------------------------------------------- - Fin del servicio - ---------------------------------------------------------------------------------------------------------*/ - close(socket_r); - exit(EXIT_SUCCESS); -} diff --git a/admin/Sources/Services/ogAdmRepo/sources/ogAdmRepo.h b/admin/Sources/Services/ogAdmRepo/sources/ogAdmRepo.h deleted file mode 100644 index 8051f3f6..00000000 --- a/admin/Sources/Services/ogAdmRepo/sources/ogAdmRepo.h +++ /dev/null @@ -1,41 +0,0 @@ -// ******************************************************************************************************** -// Servicio: ogAdmRepo -// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla -// Fecha Creación: Marzo-2010 -// Fecha Última modificación: Marzo-2010 -// Nombre del fichero: ogAdmRepo.h -// Descripción: Este fichero implementa el servicio de repositorio de imágenes -// ******************************************************************************************************** -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "ogAdmLib.h" -// ________________________________________________________________________________________________________ -// Variables globales -// ________________________________________________________________________________________________________ -char iplocal[LONPRM]; // Dirección IP del servidor de administración -char puerto[LONPRM]; // Puerto de comunicación - -char servidoradm[LONIP]; // IP del servidor - -typedef struct{ // Estructura usada para referenciar las funciones que procesan las tramas - char nf[LONFUN]; // Nombre de la función - BOOLEAN (*fptr)(SOCKET*,TRAMA*); // Puntero a la función que procesa la trama -}MSGFUN; - -MSGFUN tbfuncionesRepo[MAXIMAS_FUNCIONES]; - -// ________________________________________________________________________________________________________ -// Prototipo de funciones -// ________________________________________________________________________________________________________ -BOOLEAN tomaConfiguracion(char*); -BOOLEAN gestionaTrama(SOCKET*); -BOOLEAN tomaConfiguracion(char*); diff --git a/admin/Sources/Services/opengnsys.default b/admin/Sources/Services/opengnsys.default index 644f516a..9af83e29 100644 --- a/admin/Sources/Services/opengnsys.default +++ b/admin/Sources/Services/opengnsys.default @@ -1,7 +1,8 @@ -# RUN_OGADMSERVER run OpenGnsys Admin service. -# RUN_OGADMREPO run OpenGnsys Repository Manager service. +# RUN_OGADMSERVER defined as OpenGnsys Admin Server +# RUN_OGADMREPO defined as OpenGnsys Repository Manager +# RUN_OGADMAGENT run task scheduler service # RUN_BTTRACKER run Bittorrent Tracker -# RUN_BTSEEDER starts seeding of selected torrent files +# RUN_BTSEEDER start seeding of selected torrent files # RUN_CRON run Cron script to check started processes RUN_OGADMSERVER="yes" RUN_OGADMREPO="yes" diff --git a/admin/Sources/Services/opengnsys.init b/admin/Sources/Services/opengnsys.init index 548843fa..ae27593b 100755 --- a/admin/Sources/Services/opengnsys.init +++ b/admin/Sources/Services/opengnsys.init @@ -30,11 +30,6 @@ SERVERDAEMON_OPTIONS="-f $SERVERCFG -l $SERVERLOG" # # Servidor de Repositorio # -REPONAME=ogAdmRepo -REPODAEMON=$BASEDIR/sbin/$REPONAME -REPOCFG=$BASEDIR/etc/$REPONAME.cfg -REPOLOG=$BASEDIR/log/$REPONAME.log -REPODAEMON_OPTIONS="-f $REPOCFG -l $REPOLOG" ############## ADV REPOAUXNAME=ogAdmRepoAux REPOAUXDAEMON=$BASEDIR/sbin/$REPOAUXNAME @@ -155,17 +150,14 @@ arranca_demonios() { faucet $SERVERAUXPORT --daemon --in bash -c "$SERVERAUXDAEMON" # NUEVO [ $? = 0 ] && $SUCCESSMSG || $FAILMSG fi - if [ $RUN_OGADMSERVER = "yes" ] && [ $RUN_OGADMREPO = "yes" ]; then - sleep 5 # Damos tiempo a que ogAdmServer este funcionando - fi if [ $RUN_OGADMREPO = "yes" ]; then - $ACTIONMSG "Iniciando demonio: $REPONAME" - $DAEMONSTART $REPODAEMON $EXTRAOPTS $REPODAEMON_OPTIONS $ENDOPTS - [ $? = 0 ] && $SUCCESSMSG || $FAILMSG $ACTIONMSG "Iniciando demonio: $REPOAUXNAME" faucet $REPOAUXPORT --daemon --in bash -c "$REPOAUXDAEMON" [ $? = 0 ] && $SUCCESSMSG || $FAILMSG fi + if [ $RUN_OGADMSERVER = "yes" ] && [ $RUN_OGADMAGENT = "yes" ]; then + sleep 5 # Damos tiempo a que ogAdmServer este funcionando + fi if [ $RUN_OGADMAGENT = "yes" ]; then $ACTIONMSG "Iniciando demonio: $AGENTNAME" $DAEMONSTART $AGENTDAEMON $EXTRAOPTS $AGENTDAEMON_OPTIONS $ENDOPTS @@ -200,9 +192,6 @@ para_demonios() { $ACTIONMSG "Parando demonio: $AGENTNAME" $DAEMONSTOP $AGENTNAME [ $? = 0 ] && $SUCCESSMSG || $FAILMSG - $ACTIONMSG "Parando demonio: $REPONAME" - $DAEMONSTOP $REPONAME - [ $? = 0 ] && $SUCCESSMSG || $FAILMSG $ACTIONMSG "Parando demonio: $REPOAUXNAME" pkill faucet [ $? -le 1 ] && $SUCCESSMSG || $FAILMSG diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 2ad18cb8..0da6c226 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -1342,15 +1342,6 @@ function servicesCompilation () hayErrores=1 fi popd - # Compilar OpenGnsys Repository Manager - echoAndLog "${FUNCNAME}(): Compiling OpenGnsys Repository Manager" - pushd $WORKDIR/opengnsys/admin/Sources/Services/ogAdmRepo - make && mv ogAdmRepo $INSTALL_TARGET/sbin - if [ $? -ne 0 ]; then - echoAndLog "${FUNCNAME}(): error while compiling OpenGnsys Repository Manager" - hayErrores=1 - fi - popd # Compilar OpenGnsys Agent echoAndLog "${FUNCNAME}(): Compiling OpenGnsys Agent" pushd $WORKDIR/opengnsys/admin/Sources/Services/ogAdmAgent @@ -1502,7 +1493,7 @@ function openGnsysConfigure() $WORKDIR/opengnsys/admin/Sources/Services/ogAdmServer/ogAdmServer.cfg > $INSTALL_TARGET/etc/ogAdmServer-$dev.cfg sed -e "s/SERVERIP/${SERVERIP[i]}/g" \ -e "s/REPOKEY/$OPENGNSYS_REPOKEY/g" \ - $WORKDIR/opengnsys/admin/Sources/Services/ogAdmRepo/ogAdmRepo.cfg > $INSTALL_TARGET/etc/ogAdmRepo-$dev.cfg + $WORKDIR/opengnsys/repoman/etc/ogAdmRepo.cfg.tmpl > $INSTALL_TARGET/etc/ogAdmRepo-$dev.cfg sed -e "s/SERVERIP/${SERVERIP[i]}/g" \ -e "s/DBUSER/$OPENGNSYS_DB_USER/g" \ -e "s/DBPASSWORD/$OPENGNSYS_DB_PASSWD/g" \ diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index 7943d4e2..91505c75 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -937,16 +937,8 @@ function compileServices() hayErrores=1 fi popd - # Compilar OpenGnsys Repository Manager - echoAndLog "${FUNCNAME}(): Recompiling OpenGnsys Repository Manager" - pushd $WORKDIR/opengnsys/admin/Sources/Services/ogAdmRepo - make && moveNewService ogAdmRepo $INSTALL_TARGET/sbin - if [ $? -ne 0 ]; then - echoAndLog "${FUNCNAME}(): error while compiling OpenGnsys Repository Manager" - hayErrores=1 - fi - popd - # Actualizar o insertar clave de acceso REST en el fichero de configuración del repositorio. + # Parar antiguo servicio de repositorio y añadir clave de acceso REST en su fichero de configuración. + pgrep ogAdmRepo > /dev/null && service="ogAdmRepo" $STOPSERVICE grep -q '^ApiToken=' $INSTALL_TARGET/etc/ogAdmRepo.cfg && \ sed -i "s/^ApiToken=.*$/ApiToken=$REPOKEY/" $INSTALL_TARGET/etc/ogAdmRepo.cfg || \ sed -i "$ a\ApiToken=$REPOKEY/" $INSTALL_TARGET/etc/ogAdmRepo.cfg diff --git a/repoman/bin/opengnsys.cron b/repoman/bin/opengnsys.cron index 78f01db5..32c6f493 100755 --- a/repoman/bin/opengnsys.cron +++ b/repoman/bin/opengnsys.cron @@ -31,9 +31,4 @@ if [ "$RUN_OGADMSERVER" == "yes" ]; then /etc/init.d/opengnsys restart fi fi -# Reiniciar servicios si es repositorio y proceso ogAdmRepo está caído. -if [ "$RUN_OGADMREPO" == "yes" -a $(pgrep ogAdmRepo | wc -w) == 0 ]; then - date +"%d/%m/%Y %H:%M ERROR: El servicio ogAdmRepo estaba caido, se reinicia" >> $LOGDIR/ogAdmRepo.log - /etc/init.d/opengnsys restart -fi diff --git a/repoman/etc/logrotate.tmpl b/repoman/etc/logrotate.tmpl index f2dfcf4b..62cdbaf0 100644 --- a/repoman/etc/logrotate.tmpl +++ b/repoman/etc/logrotate.tmpl @@ -3,7 +3,7 @@ # Las copias se comprimen # Los registros de las transferencias multicast se guardan una semana (repo). # El resto de los registros se comprueban diariamente que no excedan 100k. Se mantienen los últimos 5. -# Con esta condición de los servicios ogAdmServer y ogAdmRepo conservan datos de más de un mes. +# Con esta condición los servicios de OpenGnsys Repository conservan datos de más de un mes. copytruncate compress diff --git a/repoman/etc/ogAdmRepo.cfg.tmpl b/repoman/etc/ogAdmRepo.cfg.tmpl new file mode 100644 index 00000000..ed68ea60 --- /dev/null +++ b/repoman/etc/ogAdmRepo.cfg.tmpl @@ -0,0 +1,2 @@ +IPlocal=SERVERIP +ApiToken=REPOKEY diff --git a/server/etc/logrotate.tmpl b/server/etc/logrotate.tmpl index d487fcff..233efc57 100644 --- a/server/etc/logrotate.tmpl +++ b/server/etc/logrotate.tmpl @@ -3,7 +3,7 @@ # Las copias se comprimen # Los registros de las transferencias multicast se guardan una semana (repo). # El resto de los registros se comprueban diariamente que no excedan 100k. Se mantienen los últimos 5. -# Con esta condición de los servicios ogAdmServer y ogAdmRepo conservan datos de más de un mes. +# Con esta condición los servicios de OpenGnsys Server conservan datos de más de un mes. copytruncate compress diff --git a/server/lib/security-config b/server/lib/security-config index eb8bf5cf..ddba161f 100755 --- a/server/lib/security-config +++ b/server/lib/security-config @@ -42,16 +42,11 @@ s=ios.Service() s.short = 'OpenGnsys Server' s.name = 'ogAdmServer' s.ports = [('2008', 'tcp')] -ios.service_writer(s, '/etc/firewalld/services') -s.short = 'OpenGnsys Repository' -s.name = 'ogAdmRepo' -s.ports = [('2002', 'tcp')] ios.service_writer(s, '/etc/firewalld/services')" # Adding active services. firewall-cmd --permanent --add-service=dhcp firewall-cmd --permanent --add-service=https firewall-cmd --permanent --add-service=mysql --zone internal - firewall-cmd --permanent --add-service=ogAdmRepo firewall-cmd --permanent --add-service=ogAdmServer # Ubuntu 14.04 does not define "rsyncd" service. firewall-cmd --permanent --add-service=rsyncd || \ -- cgit v1.2.3-18-g5258 From 37481d8781c8f9b023ecd34c125f28c4b1e96381 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Thu, 15 Nov 2018 16:11:31 +0100 Subject: #784: Apache configuration now supports connection with PHP-FPM via socket and port. --- installer/opengnsys_installer.sh | 10 ++++++++-- installer/opengnsys_update.sh | 8 +++++++- server/etc/apache.conf.tmpl | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 0da6c226..d877548b 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -1169,8 +1169,14 @@ function installWebConsoleApacheConf() $WORKDIR/opengnsys/server/etc/apache-prev2.4.conf.tmpl > $path_apache2_confd/$APACHESITESDIR/${APACHEOGSITE} else # Configuración específica a partir de Apache 2.4 - sed -e "s,CONSOLEDIR,$CONSOLEDIR,g; s,SOCKFILE,$sockfile,g" \ - $WORKDIR/opengnsys/server/etc/apache.conf.tmpl > $path_apache2_confd/$APACHESITESDIR/${APACHEOGSITE}.conf + if [ -n "$sockfile" ]; then + sed -e "s,CONSOLEDIR,$CONSOLEDIR,g" \ + -e "s,proxy:fcgi:.*,proxy:unix:${sockfile%% *}|fcgi://localhost\",g" \ + $WORKDIR/opengnsys/server/etc/apache.conf.tmpl > $path_apache2_confd/$APACHESITESDIR/${APACHEOGSITE}.conf + else + sed -e "s,CONSOLEDIR,$CONSOLEDIR,g" \ + $WORKDIR/opengnsys/server/etc/apache.conf.tmpl > $path_apache2_confd/$APACHESITESDIR/${APACHEOGSITE}.conf + fi fi $APACHEENABLEOG if [ $? -ne 0 ]; then diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index 91505c75..a2a818ee 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -572,7 +572,13 @@ function apacheConfiguration () sockfile=$(find /run/php -name "php*.sock" -type s -print 2>/dev/null) # Actualizar configuración de Apache a partir de fichero de plantilla. for config in $APACHECFGDIR/{,sites-available/}opengnsys.conf; do - [ -e $config ] && sed -e "s,CONSOLEDIR,$INSTALL_TARGET/www,g; s/SOCKETFILE/$socketfile/g" $template > $config + if [ -e $config ]; then + if [ -n "$sockfile" ]; then + sed -e "s,CONSOLEDIR,$INSTALL_TARGET/www,g; s,proxy:fcgi:.*,proxy:unix:${sockfile%% *}|fcgi://localhost\",g" $template > $config + else + sed -e "s,CONSOLEDIR,$INSTALL_TARGET/www,g" $template > $config + fi + fi done # Reiniciar Apache. diff --git a/server/etc/apache.conf.tmpl b/server/etc/apache.conf.tmpl index d637c2fe..edb3fda8 100644 --- a/server/etc/apache.conf.tmpl +++ b/server/etc/apache.conf.tmpl @@ -5,7 +5,7 @@ Alias /opengnsys CONSOLEDIR # PHP-FPM configuration - SetHandler "proxy:unix:SOCKFILE|fcgi://localhost" + SetHandler "proxy:fcgi://127.0.0.1:9000" -- cgit v1.2.3-18-g5258 From c5fcac1480d7023c0f823acffababfd57d7f7fce Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Thu, 15 Nov 2018 16:48:23 +0100 Subject: #875: Update list of enabled ports. --- server/lib/security-config | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/server/lib/security-config b/server/lib/security-config index ddba161f..11961758 100755 --- a/server/lib/security-config +++ b/server/lib/security-config @@ -19,7 +19,8 @@ if [ "$USER" != "root" ]; then fi # UFW configuration. -if which ufw 2>/dev/null; then +if which ufw &>/dev/null; then + echo "Configuring UFW." # Adding active services. ufw allow "Apache Secure" ufw allow OpenSSH @@ -28,24 +29,30 @@ if which ufw 2>/dev/null; then ufw allow rsync ufw allow tftp ufw allow 67,68/udp # DHCP - ufw allow 2002,2008/tcp # OpenGnsys services - ufw allow 9000:9051/udp # Multicast + ufw allow 2008/tcp # OpenGnsys service ufw allow 6881:6999/udp # BitTorrent + ufw allow 9000/tcp # PHP-FPM + ufw allow 9000:9051/udp # Multicast # Applying configuration. ufw enable # FirewallD configuration. -elif which firewall-cmd 2>/dev/null; then - # Defining OpenGnsys services. +elif which firewall-cmd &>/dev/null; then + echo "Configuring FirewallD." + # Defining services. python -c " import firewall.core.io.service as ios s=ios.Service() s.short = 'OpenGnsys Server' s.name = 'ogAdmServer' s.ports = [('2008', 'tcp')] +ios.service_writer(s, '/etc/firewalld/services') +s.name = 'php-fpm' +s.ports = [('9000', 'tcp')] ios.service_writer(s, '/etc/firewalld/services')" # Adding active services. firewall-cmd --permanent --add-service=dhcp firewall-cmd --permanent --add-service=https + firewall-cmd --permanent --add-service=php-fpm firewall-cmd --permanent --add-service=mysql --zone internal firewall-cmd --permanent --add-service=ogAdmServer # Ubuntu 14.04 does not define "rsyncd" service. @@ -65,7 +72,8 @@ else fi # SELinux configuration. -if which setsebool 2>/dev/null; then +if which setsebool &>/dev/null; then + echo "Configuring SELinux." # Configuring Apache. setsebool -P httpd_can_connect_ldap on semanage fcontext -at httpd_sys_content_t "$OPENGNSYS/www(/.*)?" -- cgit v1.2.3-18-g5258 From df7d8f0db2aeb86190b6aa46a68b2dc8f6bf10a6 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Thu, 15 Nov 2018 18:16:27 +0100 Subject: #856: Improvements in {{{setserveraddr}}} script: * If Server is active, updating IP address in PXE files and database tables. * If Repository is active, generating new API token. * Supporting an IP address as input parameter. --- server/bin/setserveraddr | 161 ++++++++++++++++++++++++++++------------------- 1 file changed, 95 insertions(+), 66 deletions(-) diff --git a/server/bin/setserveraddr b/server/bin/setserveraddr index bdcfb796..eb52d64d 100755 --- a/server/bin/setserveraddr +++ b/server/bin/setserveraddr @@ -1,21 +1,32 @@ #!/bin/bash -# setserveraddr: modifica los ficheros de configuración para asignar los valores -# de la interfaz de red solicitada. -# Nota: se enlazan los ficheros a los predefinidos detectados para la interfaz. -# Uso: setserveraddr iface -# Autor: Ramon Gomez - Univ. Sevilla -# Fecha: 2011-01-25 -# Versión: 1.0.5 - Regenerar ficheros de configuración. -# Autor: Ramon Gomez - Univ. Sevilla -# Fecha: 2014-06-06 - -# Variables globales. -PROG="$(basename $0)" - -# Comprobar parámetros. +#/** +# setserveraddr {str_ipaddress | str_netiface} +#@file setserveraddr +#@brief Command the modifies configuration files to assign the default network interface. +#@param str_ipaddress IP address assigned to a network interface +#@param str_netiface network interface name defined by the operating system. +#@version Initial version. +#@author Ramón M. Gómez - ETSII Univ. Sevilla +#@date 2011-01-25 +#@version 1.0.5 - Regenerate configuration files. +#@author Ramón M. Gómez - ETSII Univ. Sevilla +#@date 2014-06-06 +#@version 1.1.1 - Updating menu URLs, PXE files, and repository API key. +#@author Ramón M. Gómez - ETSII Univ. Sevilla +#@date 2018-11-15 +#*/ ## + + +# Variables. +PROG="$(basename "$0")" +OPENGNSYS=/opt/opengnsys +PXEDIR=$OPENGNSYS/tftpboot/menu.lst +DEFAULTFILE=/etc/default/opengnsys + +# Checking parameters. if [ $# -ne 1 ]; then - echo "$PROG: Incorrect operand. Format: $PROG interface" >&2 + echo "$PROG: Incorrect operand. Format: $PROG ipaddress|netiface" >&2 exit 1 fi if [ "$USER" != "root" ]; then @@ -23,36 +34,40 @@ if [ "$USER" != "root" ]; then exit 1 fi -# Aviso informando de que los clientes iniciados pueden quedarse colgados. -read -p "WARNING: initiated clients can hang. Continue? (y/n): " ANSWER -if [ "${ANSWER^^}" != "Y" ]; then +# Showing warning to inform that initiated clients may hang. +read -rp "WARNING: initiated clients can hang. Continue? (y/n): " ANSWER +if [ "${ANSWER,,}" != "y" ]; then echo "Operation canceled." exit 0 fi -# Detectar la interfaz de red. -DEVICES=$(ip -o link show up|awk -F: '$2!~/lo/ {print $2}') +# Detecting network interfaces. +DEVICES=$(ip -o link show up | awk -F: '$2!~/lo/ {print $2}') for DEV in $DEVICES; do - # Si se encuentra la interfaz de red, obtener su dirección IP. - [ "$DEV" == "$1" ] && SERVERIP=$(ip -o addr show dev $DEV | awk '$3~/inet$/ {sub (/\/.*/, ""); print ($4)}') + # If the network interface is found, get its IP address. + IP=$(ip -o addr show dev "$DEV" | awk '$3~/inet$/ {sub (/\/.*/, ""); print ($4)}') + if [ "$DEV" == "$1" ] || [ "$IP" == "$1" ]; then + SERVERIP="$IP" + SERVERDEV="$DEV" + fi done -# Comprobar si se ha detectado dirección IP. +# Checking if IP address has been detected. if [ -n "$SERVERIP" ]; then - # Ficheros temporales. + # Temporary files. tmpfile=$(mktemp /tmp/og.XXXXX) MYCNF=$(mktemp /tmp/.my.cnf.XXXXX) trap "rm -f $tmpfile $MYCNF" 1 2 3 6 9 15 - # Comprobar si hay que modificar la configuración de DHCP. + # Checking whether the DHCP settings need to be changed. CHANGE=0 for f in /etc/{dhcp,hcp3}/dhcpd.conf; do if [ -f $f ]; then - # Cambiar el parámetro "next-server" de DHCP. - file="${f/./-$1.}" + # Changing DHCP "next-server" parameter. + file="${f/./-$SERVERDEV.}" sed -e "s/next-server.*/next-server $SERVERIP;/" \ -e "s/option routers ;/option routers ${SERVERIP%.*}.1;/" $file >$tmpfile - # Copiar el fichero y enlazarlo si hay cambios. + # Copying and linking file if there are changes. if [ ! $f -ef $file ] || ! diff -q $tmpfile $file &>/dev/null; then mv $tmpfile $file chmod 644 $file @@ -61,7 +76,7 @@ if [ -n "$SERVERIP" ]; then fi fi done - # Si ha cambiado la configuración, reiniciar DHCP. + # Restarting DHCP service if its configuration has changed. if [ $CHANGE == 1 ]; then for f in /etc/init.d/{isc-dhcp-server,dhcp3-server,dhcpd}; do [ -x $f ] && $f restart @@ -70,80 +85,94 @@ if [ -n "$SERVERIP" ]; then echo "DHCP configuration has not changed." fi - # Guardar la IP anterior del repositorio. - OPENGNSYS=/opt/opengnsys + # Saving old IP address. source $OPENGNSYS/etc/ogAdmRepo.cfg OLDSERVERIP=$IPlocal - # Comprobar si hay que modificar la configuración de OpenGnsys. + # Checking if configuration files need to be modified. CHANGE=0 - # Procesar los ficheros de configuración de OpenGnsys. for f in $OPENGNSYS/{etc/{ogAdmServer,ogAdmRepo,ogAdmAgent}.cfg,www/controlacceso.php,client/etc/ogAdmClient.cfg}; do - # Error si no existe algún fichero de configuración. + # Error if configuration file cannot be found. if [ ! -f $f ]; then echo "$PROG: File $file does not exist." >&2 exit 2 fi - # Cambiar la IP del servidor: - # - variables ServidorAdm e IPlocal, - # - servidor o IP en URLs excepto si contienen "localhost". + # Updating configuration variables (if URLs does not contain "localhost"). sed -e "s,ServidorAdm=.*,ServidorAdm=$SERVERIP," \ -e "s,IPlocal=.*,IPlocal=$SERVERIP," \ -e "s,UrlMenu=https?://\([^/]*\)/\(.*\),UrlMenu=https://$SERVERIP/\2," \ -e '/localhost/!s,https\?://[^/]*/\(.*\),https://'$SERVERIP'/\1,' $f >$tmpfile - file="${f/./-$1.}" - # Si se usa otro interfaz o cambian los datos de red; ... + file="${f/./-$SERVERDEV.}" + # Copying updated file, if needed. if [ ! $f -ef $file ] || ! diff -q $tmpfile $file &>/dev/null; then - # Copiar el fichero y enlazarlo. cp $tmpfile $file ln -f $file $f CHANGE=1 fi done - # Si ha cambiado la configuración, reiniciar OpenGnsys y actualizar la BD. + # Processing when something has changed. if [ $CHANGE == 1 ]; then + # Restart OpenGnsys services. /etc/init.d/opengnsys restart - source $OPENGNSYS/etc/ogAdmServer.cfg - # Componer fichero con credenciales de conexión. - cat << EOT > $MYCNF + # If Repository is active, generating a new API token. + source $DEFAULTFILE + if [ "$RUN_OGADMREPO" == "yes" ]; then + REPOKEY=$(php -r 'echo md5(uniqid(rand(), true));') + sed -i -e "s/ApiToken=.*/ApiToken=$REPOKEY/" $OPENGNSYS/etc/ogAdmRepo.cfg + fi + # If OpenGnsys Server is active, updating the database. + if [ "$RUN_OGADMSERVER" == "yes" ]; then + source $OPENGNSYS/etc/ogAdmServer.cfg + # Creating credentials file. + cat << EOT > $MYCNF [client] user=$USUARIO password=$PASSWORD EOT - # Actualizar IP del servidor en la BD. - mysql --defaults-extra-file=$MYCNF -D "$CATALOG" -e \ - "UPDATE entornos - SET ipserveradm='$SERVERIP' - WHERE identorno=1" - - # Actualizar IP del repositorio en la BD. - mysql --defaults-extra-file=$MYCNF -D "$CATALOG" -e \ - "UPDATE repositorios - SET ip='$SERVERIP' - WHERE ip='$OLDSERVERIP'" + # Updating OpenGnsys Server IP address. + mysql --defaults-extra-file=$MYCNF -D "$CATALOG" -e \ + "UPDATE entornos + SET ipserveradm='$SERVERIP' + WHERE identorno=1" + # If OpenGnsys Repository is active, updating IP address and API token. + if [ "$RUN_OGADMREPO" == "yes" ]; then + mysql --defaults-extra-file=$MYCNF -D "$CATALOG" -e \ + "UPDATE repositorios + SET ip='$SERVERIP', apikey='$REPOKEY' + WHERE ip='$OLDSERVERIP'" + unset REPOKEY + fi + # Updating all menu URLs. + mysql --defaults-extra-file=$MYCNF -D "$CATALOG" -e \ + "UPDATE menus + SET htmlmenupub = REPLACE(htmlmenupub, '$OLDSERVERIP', '$SERVERIP'), + htmlmenupri = REPLACE(htmlmenupri, '$OLDSERVERIP', '$SERVERIP');" + # Updating all PXE files. + find $PXEDIR -name "01-*" -exec sed -i -e "s/$OLDSERVERIP/$SERVERIP/g" {} \; + fi - # Mostrar instrucciones a realizar tras la ejecución. + # Showing manual task to do after execution. cat << EOT -Default server interface set to: $1 ($SERVERIP) +Default server interface set to: $SERVERDEV ($SERVERIP) Manual tasks: -Check DHCP configuration file and restart service, if needed. -Log-in as Web Console organization user. - - Check URLs in all menus. - - Run Advanced Netboot in all rooms. - +- Check DHCP configuration file and restart service, if needed. +- Check PXE files. +- Log-in as Web Console user: + - Check menu URLs. +${REPOKEY:+" - Update repository API token"} EOT else - # Mensaje indicando que no se han cambiado datos. + # Showing message if nothing changes. echo "Default interface has not changed: $1" fi else - # Error: interfaz de red no encontrado. - echo "$PROG: Network device not found. Format: $PROG interface" >&2 + # Error if network interface is not found. + echo "$PROG: Network device not found. Format: $PROG ipaddress|netiface" >&2 exit 1 fi -# Eliminar ficheros temporales. +# Removing temporary files. rm -f $tmpfile $MYCNF -- cgit v1.2.3-18-g5258 From bce19109d1df40ae6c3e29215a5d72cc79b097d1 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Fri, 16 Nov 2018 12:32:37 +0100 Subject: #873: Updating database image info when local repo is also configured as admin server. --- repoman/bin/importimage | 72 ++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 62 insertions(+), 10 deletions(-) diff --git a/repoman/bin/importimage b/repoman/bin/importimage index 36a188e4..82da238f 100755 --- a/repoman/bin/importimage +++ b/repoman/bin/importimage @@ -18,7 +18,10 @@ PROG="$(basename "$0")" OPENGNSYS="/opt/opengnsys" REPODIR="$OPENGNSYS/images" SERVERCONF="$OPENGNSYS/etc/ogAdmServer.cfg" +DEFAULTFILE="/etc/default/opengnsys" +MYCNF=$(mktemp /tmp/.my.cnf.XXXXX) let BACKUP=0 +source $DEFAULTFILE # Functions. source $OPENGNSYS/lib/ogfunctions.sh @@ -27,7 +30,8 @@ source $OPENGNSYS/lib/ogfunctions.sh # Main program. # Error control. -[ "$USER" = "root" ] || raiseError access "Need to be root." +[ "$USER" == "root" ] || raiseError access "Need to be root." +[ "$RUN_OGADMREPO" == "yes" ] || raiseError access "This server is not defined as image repository." [ -w $REPODIR ] || raiseError access "Cannot write in local repository." case $# in 2) USERNAME="$SUDO_USER"; REPO="$1"; IMAGE="$2" ;; @@ -35,7 +39,7 @@ case $# in *) [ "$*" == "help" ] && help || raiseError usage esac source $SERVERCONF &>/dev/null -[ "${REPO,,}" == "${HOSTNAME,,}" -o "${REPO,,}" == "localhost" -o "${REPO}" == "127.0.0.1" -o "${REPO,,}" == "${IPLocal,,}}" ] && raiseError access "Cannot import from local repository." +[ "${REPO,,}" == "${HOSTNAME,,}" ] || [ "${REPO,,}" == "localhost" ] || [ "${REPO}" == "127.0.0.1" ] || [ "${REPO,,}" == "${IPLocal,,}}" ] && raiseError access "Cannot import from local repository." # Fetching image info from the repository. read -rp "Enter repository API token: " APITOKEN @@ -73,7 +77,7 @@ if [ -e "$IMAGEPATH" ]; then fi # Trapping signal to unlock image before exit. -trap "rm -f $LOCKFILE" 1 2 3 6 9 15 +trap "rm -f $LOCKFILE $MYCNF" 1 2 3 6 9 15 # Creating lock file. touch $LOCKFILE # Backing up local image. @@ -85,18 +89,66 @@ if [ $BACKUP -eq 1 ]; then fi # Downloading image file. [[ $IMAGEPATH =~ / ]] && mkdir -p "$(dirname "$IMAGEPATH")" -scp $USERNAME@$REPO:$IMAGEPATH $REPODIR +scp "$USERNAME@$REPO:$IMAGEPATH" $REPODIR ERRCODE=$? if [ $ERRCODE -eq 0 ]; then # Storing creation info. jq -r '.clonator+":"+.compressor+":"+.filesystem+":"+(.datasize|tostring)+":"' <<<"$IMAGEINFO" > "$IMAGEPATH.info" - #### Si no es backup de imagen y es repo con server, - #### crear objeto imagen asociado a nuevo perfil de software vacío. - DOWNLOADSIZE=$(stat -c "%s" $IMAGEPATH) + # If this repo is Administration Server, update database. + if [ "$RUN_OGADMREPO" == "yes" ]; then + # Creating credentials file. + cat << EOT > $MYCNF +[client] +user=$USUARIO +password=$PASSWORD +EOT + if [ $BACKUP -eq 1 ]; then + # If the image exists, increase its revision number. + mysql --defaults-extra-file=$MYCNF -D "$CATALOG" -e \ + "UPDATE imagenes + SET revision = revision + 1 + WHERE nombreca='$IMAGE';" || \ + echo "Warning: database cannot be updated." + else + # Obtaining defined Organizational Units. + while read -re DATA; do + OUS[${#OUS[@]}]="$DATA" + done <<<$(mysql --defaults-extra-file=$MYCNF -D "$CATALOG" -Nse \ + "SELECT idcentro, nombrecentro FROM centros;") + if [ ${#OUS[@]} -eq 1 ]; then + # Only 1 OU is defined. + let OUID="${OUS%% *}" + else + # Choose image OU. + echo "Choose Organization Unit:" + for ((i=0; i<${#OUS[@]}; i++)); do + echo " $i: ${OUS[i]#* }" + done + read -rp "Enter number (0 by default): " ANSWER + let OUID="${OUS[ANSWER]%% *}" 2>/dev/null || let OUID="${OUS[0]%% *}" + fi + # Creating a new image associated with an empty software profile. + mysql --defaults-extra-file=$MYCNF -D "$CATALOG" -e \ + "SET @profname = '$IMAGE imported from $REPO'; + INSERT INTO perfilessoft (descripcion, idcentro) + SELECT @profname, $OUID FROM DUAL + WHERE NOT EXISTS + (SELECT descripcion FROM perfilessoft + WHERE descripcion=@profname AND idcentro='$OUID') + LIMIT 1; + SET @profid = LAST_INSERT_ID(); + INSERT INTO imagenes + (nombreca, revision, idperfilsoft, idcentro, comentarios, idrepositorio, fechacreacion) + VALUES ('$IMAGE', 1, @profid, $OUID, 'Image imported from repo $REPO', 1, NOW());" || \ + echo "Warning: database cannot be updated." + fi + fi + # Cheking image size. + DOWNLOADSIZE=$(stat -c "%s" "$IMAGEPATH") [ $IMAGESIZE -ne $DOWNLOADSIZE ] && echo "Warning: image sizes differ: source=$IMAGESIZE, target=$DOWNLOADSIZE." else + # On download error, trying to recover backup. raiseError download "$USERNAME@$REPO:$IMAGEPATH" - # Recovering back up, if needed. if [ $BACKUP -eq 1 ]; then mv -vf "$IMAGEPATH.ant" "$IMAGEPATH" 2>/dev/null mv -vf "$IMAGEPATH.torrent.ant" "$IMAGEPATH.torrent" 2>/dev/null @@ -105,6 +157,6 @@ else fi fi -# Unlocking image. -rm -f $LOCKFILE +# Unlocking image and removing temporary file. +rm -f $LOCKFILE $MYCNF -- cgit v1.2.3-18-g5258 From 532b3517f77e1a648effd6e9d278113e5259dffd Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Fri, 16 Nov 2018 18:05:52 +0100 Subject: #873: Rearrange script code and fix SQL sentences. --- repoman/bin/importimage | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/repoman/bin/importimage b/repoman/bin/importimage index 82da238f..3a5a7bf3 100755 --- a/repoman/bin/importimage +++ b/repoman/bin/importimage @@ -39,7 +39,7 @@ case $# in *) [ "$*" == "help" ] && help || raiseError usage esac source $SERVERCONF &>/dev/null -[ "${REPO,,}" == "${HOSTNAME,,}" ] || [ "${REPO,,}" == "localhost" ] || [ "${REPO}" == "127.0.0.1" ] || [ "${REPO,,}" == "${IPLocal,,}}" ] && raiseError access "Cannot import from local repository." +[ "${REPO,,}" == "${HOSTNAME,,}" ] || [ "${REPO,,}" == "localhost" ] || [ "${REPO}" == "127.0.0.1" ] || [ "${REPO,,}" == "${IPlocal,,}}" ] && raiseError access "Cannot import from local repository." # Fetching image info from the repository. read -rp "Enter repository API token: " APITOKEN @@ -59,12 +59,13 @@ IMAGELOCKED="$(jq -r '.locked' <<< "$IMAGEINFO" 2>/dev/null)" [ "$IMAGELOCKED" == "true" ] && raiseError access "Image locked by remote repository." IMAGESIZE="$(jq -r '.size' <<< "$IMAGEINFO" 2>/dev/null)" [ -z "$IMAGESIZE" ] && raiseError access "Cannot retrieve image size" -# Checking if local image is locked. -LOCKFILE="$IMAGEPATH.lock" -[ -f "$LOCKFILE" ] && raiseError access "Local image is locked, cannot write." # Checking if local image exists. IMAGEPATH="$REPODIR/$IMAGENAME.$IMAGETYPE" if [ -e "$IMAGEPATH" ]; then + # Checking if local image is locked. + LOCKFILE="$IMAGEPATH.lock" + [ -f "$LOCKFILE" ] && raiseError access "Local image is locked, cannot write." + # Confirm image download. read -rp "Image $IMAGENAME exists in the local repository. Do you want to continue? (y/N): " ANSWER [ "${ANSWER,,}" = "y" ] || exit BACKUP=1 @@ -94,7 +95,7 @@ ERRCODE=$? if [ $ERRCODE -eq 0 ]; then # Storing creation info. jq -r '.clonator+":"+.compressor+":"+.filesystem+":"+(.datasize|tostring)+":"' <<<"$IMAGEINFO" > "$IMAGEPATH.info" - # If this repo is Administration Server, update database. + # Updating the database when the repo is also configured as Administration Server. if [ "$RUN_OGADMREPO" == "yes" ]; then # Creating credentials file. cat << EOT > $MYCNF @@ -105,10 +106,10 @@ EOT if [ $BACKUP -eq 1 ]; then # If the image exists, increase its revision number. mysql --defaults-extra-file=$MYCNF -D "$CATALOG" -e \ - "UPDATE imagenes - SET revision = revision + 1 - WHERE nombreca='$IMAGE';" || \ - echo "Warning: database cannot be updated." + "UPDATE imagenes + SET revision = revision + 1 + WHERE nombreca='$IMAGE';" || \ + echo "Warning: database cannot be updated." else # Obtaining defined Organizational Units. while read -re DATA; do @@ -129,17 +130,19 @@ EOT fi # Creating a new image associated with an empty software profile. mysql --defaults-extra-file=$MYCNF -D "$CATALOG" -e \ - "SET @profname = '$IMAGE imported from $REPO'; - INSERT INTO perfilessoft (descripcion, idcentro) - SELECT @profname, $OUID FROM DUAL + "SET @repoid = (SELECT idrepositorio FROM repositorios + WHERE ip='$IPlocal' LIMIT 1), + @profname = '$IMAGE imported from $REPO'; + INSERT INTO perfilessoft (descripcion, idcentro, grupoid) + SELECT @profname, '$OUID', 0 FROM DUAL WHERE NOT EXISTS (SELECT descripcion FROM perfilessoft WHERE descripcion=@profname AND idcentro='$OUID') LIMIT 1; SET @profid = LAST_INSERT_ID(); INSERT INTO imagenes - (nombreca, revision, idperfilsoft, idcentro, comentarios, idrepositorio, fechacreacion) - VALUES ('$IMAGE', 1, @profid, $OUID, 'Image imported from repo $REPO', 1, NOW());" || \ + (nombreca, revision, idperfilsoft, idcentro, comentarios, grupoid, idrepositorio, fechacreacion) + VALUES ('$IMAGE', 1, @profid, '$OUID', 'Image imported from repo $REPO', 0, @repoid, NOW());" || \ echo "Warning: database cannot be updated." fi fi -- cgit v1.2.3-18-g5258 From 80cbc63d12dac8c2115af72508538e1e30a820cd Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Tue, 20 Nov 2018 09:38:59 +0100 Subject: #870 Propiedades ordenadores: permite no asignar repositorio al equipo. Árbol de imágenes: se muestran bien las imágenes diferenciales de un repositorio borrado. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/WebConsole/jscripts/propiedades_ordenadores.js | 3 +-- admin/WebConsole/principal/imagenes.php | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/admin/WebConsole/jscripts/propiedades_ordenadores.js b/admin/WebConsole/jscripts/propiedades_ordenadores.js index f42c309f..ff7c3c7a 100644 --- a/admin/WebConsole/jscripts/propiedades_ordenadores.js +++ b/admin/WebConsole/jscripts/propiedades_ordenadores.js @@ -96,6 +96,5 @@ function comprobar_datos(){ validate (form.nombreordenador, validate_text_notnull, 0) && validate (form.ip, validate_ipadress_notnull, 1) && validate (form.mac, validate_macaddress_notnull, 2) && - validate (form.numserie, validate_alphanum, 3) && - validate (form.idrepositorio, validate_number_notnull, 5) ; + validate (form.numserie, validate_alphanum, 3) ; } diff --git a/admin/WebConsole/principal/imagenes.php b/admin/WebConsole/principal/imagenes.php index 4ba41ff0..553979db 100644 --- a/admin/WebConsole/principal/imagenes.php +++ b/admin/WebConsole/principal/imagenes.php @@ -242,9 +242,8 @@ function SubarbolXML_Imagenes($grupoid,$amb,$litamb,$tipo) // Para hallar el repositorio de las incrementales hay que buscar los datos de la imagen basica (en la propia tablas imágenes) if ($tipo == 3) { $cmd->texto.=" INNER JOIN imagenes AS basica - LEFT JOIN repositorios - WHERE basica.idrepositorio=repositorios.idrepositorio - AND imagenes.imagenid=basica.idimagen AND "; + LEFT JOIN repositorios ON basica.idrepositorio=repositorios.idrepositorio + WHERE imagenes.imagenid=basica.idimagen AND "; } else { $cmd->texto.=" LEFT JOIN repositorios USING (idrepositorio) WHERE "; } -- cgit v1.2.3-18-g5258 From a37e8cbbc4557c4407a0d29edd97bf472da0b4b1 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Tue, 20 Nov 2018 09:58:14 +0100 Subject: #840: Updating script {{{checkperms}}} to assign proper permissions. --- installer/opengnsys_installer.sh | 14 -------------- installer/opengnsys_update.sh | 1 - server/bin/checkperms | 2 +- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index d877548b..883ef19e 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -1091,12 +1091,8 @@ function installWebFiles() cp -a $COMPATDIR/imagenes.device.php $COMPATDIR/imagenes.device4.php # Acceso al manual de usuario ln -fs ../doc/userManual $INSTALL_TARGET/www/userManual - # Cambiar permisos para ficheros especiales. - chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/www/images/{fotos,iconos} - chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/www/tmp/ # Ficheros de log de la API REST. touch $INSTALL_TARGET/log/{ogagent,remotepc,rest}.log - chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/log/{ogagent,remotepc,rest}.log echoAndLog "${FUNCNAME}(): Web files installed successfully." } @@ -1201,7 +1197,6 @@ function makeDoxygenFiles() return 1 fi mv "$INSTALL_TARGET/www/html" "$INSTALL_TARGET/www/api" - chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/www/api echoAndLog "${FUNCNAME}(): Doxygen web files created successfully." } @@ -1249,15 +1244,6 @@ function createDirs() fi fi - # Establecer los permisos básicos. - echoAndLog "${FUNCNAME}(): setting directory permissions" - chmod -R 775 $path_opengnsys_base/{log/clients,images} - chown -R :$OPENGNSYS_CLIENT_USER $path_opengnsys_base/{log/clients,images} - if [ $? -ne 0 ]; then - errorAndLog "${FUNCNAME}(): error while setting permissions" - return 1 - fi - # Mover el fichero de registro de instalación al directorio de logs. echoAndLog "${FUNCNAME}(): moving installation log file" mv $LOG_FILE $OGLOGFILE && LOG_FILE=$OGLOGFILE diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index a2a818ee..c43dc8fc 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -672,7 +672,6 @@ function updateWebFiles() ln -fs ../doc/userManual $INSTALL_TARGET/www/userManual # Fichero de log de la API REST. touch $INSTALL_TARGET/log/{ogagent,rest,remotepc}.log - chown -R $APACHE_RUN_USER:$APACHE_RUN_GROUP $INSTALL_TARGET/log/{ogagent,rest,remotepc}.log echoAndLog "${FUNCNAME}(): Web files successfully updated" } diff --git a/server/bin/checkperms b/server/bin/checkperms index fbe3be0f..5c558c45 100755 --- a/server/bin/checkperms +++ b/server/bin/checkperms @@ -57,5 +57,5 @@ chown -R $APACHE_USER:$APACHE_GROUP $OPENGNSYS_DIR/tftpboot/menu.lst chown -R :$OPENGNSYS_USER $OPENGNSYS_DIR/tftpboot/ogLive* find -L $OPENGNSYS_DIR/tftpboot -type d -exec chmod 755 {} \; find -L $OPENGNSYS_DIR/tftpboot -type f -exec chmod 644 {} \; -chown $APACHE_USER:$APACHE_GROUP $OPENGNSYS_DIR/log/ogagent.log +chown $APACHE_USER:$APACHE_GROUP $OPENGNSYS_DIR/log/{ogagent,remotepc,rest}.log -- cgit v1.2.3-18-g5258 From b3dfeb6d33eab2e0a664d111bf6a30679e9df057 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Tue, 20 Nov 2018 12:52:28 +0100 Subject: #875: Remove port from repository properties form and alter the database. --- admin/Database/ogAdmBD-1.1.0a-1.1.1pre.sql | 4 ++++ admin/Database/ogAdmBD-1.1.1pre.sql | 7 +++++++ admin/Database/ogAdmBD.sql | 1 - admin/WebConsole/gestores/gestor_repositorios.php | 9 ++------- .../idiomas/php/cat/propiedades_repositorios_cat.php | 7 +++---- .../idiomas/php/eng/propiedades_repositorios_eng.php | 4 ++-- .../idiomas/php/esp/propiedades_repositorios_esp.php | 7 +++---- admin/WebConsole/jscripts/propiedades_repositorios.js | 1 - admin/WebConsole/propiedades/propiedades_repositorios.php | 15 +-------------- 9 files changed, 22 insertions(+), 33 deletions(-) diff --git a/admin/Database/ogAdmBD-1.1.0a-1.1.1pre.sql b/admin/Database/ogAdmBD-1.1.0a-1.1.1pre.sql index 9b5ccadd..2ad8b0df 100644 --- a/admin/Database/ogAdmBD-1.1.0a-1.1.1pre.sql +++ b/admin/Database/ogAdmBD-1.1.0a-1.1.1pre.sql @@ -6,3 +6,7 @@ ALTER TABLE aulas ADD idordprofesor INT(11) DEFAULT 0 AFTER puestos; +# Borrar campo de puerto del antiguo servicio ogAdmRepo (ticket #875). +ALTER TABLE repositorios + DROP puertorepo; + diff --git a/admin/Database/ogAdmBD-1.1.1pre.sql b/admin/Database/ogAdmBD-1.1.1pre.sql index cdac985b..e29c4e42 100644 --- a/admin/Database/ogAdmBD-1.1.1pre.sql +++ b/admin/Database/ogAdmBD-1.1.1pre.sql @@ -14,6 +14,13 @@ CREATE PROCEDURE addcols() BEGIN ALTER TABLE aulas ADD idordprofesor INT(11) DEFAULT 0 AFTER puestos; END IF; + # Borrar campo de puerto del antiguo servicio ogAdmRepo (ticket #875). + IF EXISTS (SELECT * FROM information_schema.COLUMNS + WHERE COLUMN_NAME='puertorepo' AND TABLE_NAME='repositorios' AND TABLE_SCHEMA=DATABASE()) + THEN + ALTER TABLE repositorios + DROP puertorepo; + END IF; END// # Ejecutar actualización condicional. DELIMITER ';' diff --git a/admin/Database/ogAdmBD.sql b/admin/Database/ogAdmBD.sql index b45b59d8..b8d18132 100644 --- a/admin/Database/ogAdmBD.sql +++ b/admin/Database/ogAdmBD.sql @@ -811,7 +811,6 @@ CREATE TABLE `repositorios` ( `idcentro` int(11) DEFAULT NULL, `grupoid` int(11) DEFAULT NULL, `comentarios` text, - `puertorepo` int(11) NOT NULL DEFAULT '0', `apikey` varchar(32) NOT NULL DEFAULT '', PRIMARY KEY (`idrepositorio`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; diff --git a/admin/WebConsole/gestores/gestor_repositorios.php b/admin/WebConsole/gestores/gestor_repositorios.php index 7008d6d5..09a29ae1 100644 --- a/admin/WebConsole/gestores/gestor_repositorios.php +++ b/admin/WebConsole/gestores/gestor_repositorios.php @@ -26,7 +26,6 @@ $ip=""; $passguor=""; $grupoid=0; -$puertorepo=""; $apiKeyRepo=""; $comentarios=""; @@ -39,7 +38,6 @@ if (isset($_POST["identificador"])) $idrepositorio=$_POST["identificador"]; if (isset($_POST["nombrerepositorio"])) $nombrerepositorio=$_POST["nombrerepositorio"]; if (isset($_POST["ip"])) $ip=$_POST["ip"]; if (isset($_POST["passguor"])) $passguor=$_POST["passguor"]; -if (isset($_POST["puertorepo"])) $puertorepo=$_POST["puertorepo"]; if (isset($_POST["apiKeyRepo"])) $apiKeyRepo=$_POST["apiKeyRepo"]; if (isset($_POST["comentarios"])) $comentarios=$_POST["comentarios"]; @@ -111,7 +109,6 @@ function Gestiona(){ global $nombrerepositorio; global $ip; global $passguor; - global $puertorepo; global $apiKeyRepo; global $comentarios; @@ -129,13 +126,12 @@ function Gestiona(){ $cmd->CreaParametro("@nombrerepositorio",$nombrerepositorio,0); $cmd->CreaParametro("@ip",$ip,0); $cmd->CreaParametro("@passguor",$passguor,0); - $cmd->CreaParametro("@puertorepo",$puertorepo,0); $cmd->CreaParametro("@apiKeyRepo",$apiKeyRepo,0); $cmd->CreaParametro("@comentarios",$comentarios,0); switch($opcion){ case $op_alta : - $cmd->texto="INSERT INTO repositorios(idcentro,grupoid,nombrerepositorio,ip,passguor,puertorepo,comentarios,apikey) VALUES (@idcentro,@grupoid,@nombrerepositorio,@ip,@passguor,@puertorepo,@comentarios,@apiKeyRepo)"; + $cmd->texto="INSERT INTO repositorios(idcentro,grupoid,nombrerepositorio,ip,passguor,comentarios,apikey) VALUES (@idcentro,@grupoid,@nombrerepositorio,@ip,@passguor,@comentarios,@apiKeyRepo)"; $resul=$cmd->Ejecutar(); if ($resul){ // Crea una tabla nodo para devolver a la p�gina que llam� �sta $idrepositorio=$cmd->Autonumerico(); @@ -147,7 +143,7 @@ function Gestiona(){ } break; case $op_modificacion: - $cmd->texto="UPDATE repositorios SET nombrerepositorio=@nombrerepositorio,ip=@ip,passguor=@passguor,puertorepo=@puertorepo,comentarios=@comentarios, apikey=@apiKeyRepo WHERE idrepositorio=@idrepositorio"; + $cmd->texto="UPDATE repositorios SET nombrerepositorio=@nombrerepositorio,ip=@ip,passguor=@passguor,comentarios=@comentarios, apikey=@apiKeyRepo WHERE idrepositorio=@idrepositorio"; $resul=$cmd->Ejecutar(); if ($resul) { updateBootRepo($cmd, $idrepositorio); @@ -180,4 +176,3 @@ function SubarbolXML_repositorios($idrepositorio,$nombrerepositorio){ $cadenaXML.=''; return($cadenaXML); } -?> diff --git a/admin/WebConsole/idiomas/php/cat/propiedades_repositorios_cat.php b/admin/WebConsole/idiomas/php/cat/propiedades_repositorios_cat.php index 9d76b2be..d71d1200 100644 --- a/admin/WebConsole/idiomas/php/cat/propiedades_repositorios_cat.php +++ b/admin/WebConsole/idiomas/php/cat/propiedades_repositorios_cat.php @@ -1,10 +1,10 @@ diff --git a/admin/WebConsole/idiomas/php/eng/propiedades_repositorios_eng.php b/admin/WebConsole/idiomas/php/eng/propiedades_repositorios_eng.php index 8bee9e3f..0abe1c52 100644 --- a/admin/WebConsole/idiomas/php/eng/propiedades_repositorios_eng.php +++ b/admin/WebConsole/idiomas/php/eng/propiedades_repositorios_eng.php @@ -4,7 +4,7 @@ // Php language file: propiedades_repositorios_eng.php // Language: English //________________________________________________________________________________________________________ -$TbMsg=array(); +if (empty ($TbMsg)) $TbMsg=array(); $TbMsg[0]="No Option"; $TbMsg[1]="Insert"; $TbMsg[2]="Change"; @@ -13,7 +13,7 @@ $TbMsg[4]="Repository management"; $TbMsg[5]="Repository name"; $TbMsg[6]="IP address"; $TbMsg[7]="Comments"; -$TbMsg[8]="Port"; + $TbMsg[9]="Base Directory"; $TbMsg[10]="PXE Directory"; $TbMsg[11]="TOTAL space"; diff --git a/admin/WebConsole/idiomas/php/esp/propiedades_repositorios_esp.php b/admin/WebConsole/idiomas/php/esp/propiedades_repositorios_esp.php index 76a10548..e01e657b 100644 --- a/admin/WebConsole/idiomas/php/esp/propiedades_repositorios_esp.php +++ b/admin/WebConsole/idiomas/php/esp/propiedades_repositorios_esp.php @@ -1,10 +1,10 @@ diff --git a/admin/WebConsole/jscripts/propiedades_repositorios.js b/admin/WebConsole/jscripts/propiedades_repositorios.js index 74164716..f74fea61 100644 --- a/admin/WebConsole/jscripts/propiedades_repositorios.js +++ b/admin/WebConsole/jscripts/propiedades_repositorios.js @@ -91,7 +91,6 @@ function comprobar_datos(){ // Validación general de datos del formulario. return validate (fdatos.nombrerepositorio, validate_text_notnull, 0 ) && validate (fdatos.ip, validate_ipadress_notnull, 1 ) && - validate (fdatos.puertorepo, validate_number_notnull, 3 ) && validate (fdatos.comentarios, validate_text, 4 ); } diff --git a/admin/WebConsole/propiedades/propiedades_repositorios.php b/admin/WebConsole/propiedades/propiedades_repositorios.php index 87d95b0d..b2407b8a 100644 --- a/admin/WebConsole/propiedades/propiedades_repositorios.php +++ b/admin/WebConsole/propiedades/propiedades_repositorios.php @@ -23,7 +23,6 @@ $opciones=array($TbMsg[0],$TbMsg[1],$TbMsg[2],$TbMsg[3]); $idrepositorio=0; $nombrerepositorio=""; $ip=""; -$puertorepo="2002"; $apiKeyRepo=""; $grupoid=0; $comentarios=""; @@ -118,16 +117,6 @@ if($apiKeyRepo != ""){ echo''; ?> - - -    - '.$puertorepo.''; - else - echo''; - ?> -    @@ -225,12 +214,11 @@ function TomaPropiedades($cmd,$id){ global $nombrerepositorio; global $ip; global $comentarios; - global $puertorepo; global $apiKeyRepo; global $ordenadores; $cmd->texto=<<campos["nombrerepositorio"]; $ip=$rs->campos["ip"]; $comentarios=$rs->campos["comentarios"]; - $puertorepo=$rs->campos["puertorepo"]; $apiKeyRepo=$rs->campos["apikey"]; $ordenadores=$rs->campos["numordenadores"]; } -- cgit v1.2.3-18-g5258 From 60ea634fed995dbbf238a284ed18a1f60bdf3e0b Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Wed, 21 Nov 2018 13:08:37 +0100 Subject: #875: Remove unused field from repositories table and update list of closed tickets. --- admin/Database/ogAdmBD-1.1.0a-1.1.1pre.sql | 3 ++- admin/Database/ogAdmBD-1.1.1pre.sql | 3 ++- admin/Database/ogAdmBD.sql | 5 ++--- admin/WebConsole/gestores/gestor_repositorios.php | 8 ++------ admin/WebConsole/rest/server.php | 1 - doc/CHANGELOG.es.txt | 14 +++++++++++++- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/admin/Database/ogAdmBD-1.1.0a-1.1.1pre.sql b/admin/Database/ogAdmBD-1.1.0a-1.1.1pre.sql index 2ad8b0df..d0b3e0a7 100644 --- a/admin/Database/ogAdmBD-1.1.0a-1.1.1pre.sql +++ b/admin/Database/ogAdmBD-1.1.0a-1.1.1pre.sql @@ -6,7 +6,8 @@ ALTER TABLE aulas ADD idordprofesor INT(11) DEFAULT 0 AFTER puestos; -# Borrar campo de puerto del antiguo servicio ogAdmRepo (ticket #875). +# Borrar campos sin uso del antiguo servicio ogAdmRepo (ticket #875). ALTER TABLE repositorios + DROP passguor, DROP puertorepo; diff --git a/admin/Database/ogAdmBD-1.1.1pre.sql b/admin/Database/ogAdmBD-1.1.1pre.sql index e29c4e42..d10e2e5d 100644 --- a/admin/Database/ogAdmBD-1.1.1pre.sql +++ b/admin/Database/ogAdmBD-1.1.1pre.sql @@ -14,11 +14,12 @@ CREATE PROCEDURE addcols() BEGIN ALTER TABLE aulas ADD idordprofesor INT(11) DEFAULT 0 AFTER puestos; END IF; - # Borrar campo de puerto del antiguo servicio ogAdmRepo (ticket #875). + # Borrar campos sin uso del antiguo servicio ogAdmRepo (ticket #875). IF EXISTS (SELECT * FROM information_schema.COLUMNS WHERE COLUMN_NAME='puertorepo' AND TABLE_NAME='repositorios' AND TABLE_SCHEMA=DATABASE()) THEN ALTER TABLE repositorios + DROP passguor, DROP puertorepo; END IF; END// diff --git a/admin/Database/ogAdmBD.sql b/admin/Database/ogAdmBD.sql index b8d18132..d411d243 100644 --- a/admin/Database/ogAdmBD.sql +++ b/admin/Database/ogAdmBD.sql @@ -807,7 +807,6 @@ CREATE TABLE `repositorios` ( `idrepositorio` int(11) NOT NULL AUTO_INCREMENT, `nombrerepositorio` varchar(250) NOT NULL DEFAULT '', `ip` varchar(15) NOT NULL DEFAULT '', - `passguor` varchar(50) NOT NULL DEFAULT '', `idcentro` int(11) DEFAULT NULL, `grupoid` int(11) DEFAULT NULL, `comentarios` text, @@ -815,8 +814,8 @@ CREATE TABLE `repositorios` ( PRIMARY KEY (`idrepositorio`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -INSERT INTO `repositorios` (`idrepositorio`,`nombrerepositorio`,`ip`,`passguor`,`idcentro`,`grupoid`,`comentarios`,`puertorepo`,`apikey`) VALUES - (1,'Repositorio (Default)','SERVERIP','',1,0,'',2002,'REPOKEY'); +INSERT INTO `repositorios` (`idrepositorio`,`nombrerepositorio`,`ip`,`idcentro`,`grupoid`,`comentarios`,`apikey`) VALUES + (1,'Repositorio (Default)','SERVERIP',1,0,'','REPOKEY'); -- -------------------------------------------------------- diff --git a/admin/WebConsole/gestores/gestor_repositorios.php b/admin/WebConsole/gestores/gestor_repositorios.php index 09a29ae1..0d3af636 100644 --- a/admin/WebConsole/gestores/gestor_repositorios.php +++ b/admin/WebConsole/gestores/gestor_repositorios.php @@ -23,7 +23,6 @@ $opcion=0; // Inicializa parametros $idrepositorio=0; $nombrerepositorio=""; $ip=""; -$passguor=""; $grupoid=0; $apiKeyRepo=""; @@ -37,7 +36,6 @@ if (isset($_POST["identificador"])) $idrepositorio=$_POST["identificador"]; if (isset($_POST["nombrerepositorio"])) $nombrerepositorio=$_POST["nombrerepositorio"]; if (isset($_POST["ip"])) $ip=$_POST["ip"]; -if (isset($_POST["passguor"])) $passguor=$_POST["passguor"]; if (isset($_POST["apiKeyRepo"])) $apiKeyRepo=$_POST["apiKeyRepo"]; if (isset($_POST["comentarios"])) $comentarios=$_POST["comentarios"]; @@ -108,7 +106,6 @@ function Gestiona(){ global $idrepositorio; global $nombrerepositorio; global $ip; - global $passguor; global $apiKeyRepo; global $comentarios; @@ -125,13 +122,12 @@ function Gestiona(){ $cmd->CreaParametro("@idrepositorio",$idrepositorio,1); $cmd->CreaParametro("@nombrerepositorio",$nombrerepositorio,0); $cmd->CreaParametro("@ip",$ip,0); - $cmd->CreaParametro("@passguor",$passguor,0); $cmd->CreaParametro("@apiKeyRepo",$apiKeyRepo,0); $cmd->CreaParametro("@comentarios",$comentarios,0); switch($opcion){ case $op_alta : - $cmd->texto="INSERT INTO repositorios(idcentro,grupoid,nombrerepositorio,ip,passguor,comentarios,apikey) VALUES (@idcentro,@grupoid,@nombrerepositorio,@ip,@passguor,@comentarios,@apiKeyRepo)"; + $cmd->texto="INSERT INTO repositorios(idcentro,grupoid,nombrerepositorio,ip,comentarios,apikey) VALUES (@idcentro,@grupoid,@nombrerepositorio,@ip,@comentarios,@apiKeyRepo)"; $resul=$cmd->Ejecutar(); if ($resul){ // Crea una tabla nodo para devolver a la p�gina que llam� �sta $idrepositorio=$cmd->Autonumerico(); @@ -143,7 +139,7 @@ function Gestiona(){ } break; case $op_modificacion: - $cmd->texto="UPDATE repositorios SET nombrerepositorio=@nombrerepositorio,ip=@ip,passguor=@passguor,comentarios=@comentarios, apikey=@apiKeyRepo WHERE idrepositorio=@idrepositorio"; + $cmd->texto="UPDATE repositorios SET nombrerepositorio=@nombrerepositorio,ip=@ip,comentarios=@comentarios, apikey=@apiKeyRepo WHERE idrepositorio=@idrepositorio"; $resul=$cmd->Ejecutar(); if ($resul) { updateBootRepo($cmd, $idrepositorio); diff --git a/admin/WebConsole/rest/server.php b/admin/WebConsole/rest/server.php index 1721411d..93cef872 100644 --- a/admin/WebConsole/rest/server.php +++ b/admin/WebConsole/rest/server.php @@ -878,7 +878,6 @@ EOD; $response['name'] = $rs->campos["nombrerepositorio"]; $response['description'] = $rs->campos["comentarios"]; $response['ip'] = $rs->campos["ip"]; - //$response['port'] = $rs->campos["puertorepo"]; jsonResponse(200, $response); } $rs->Cerrar(); diff --git a/doc/CHANGELOG.es.txt b/doc/CHANGELOG.es.txt index 2347067e..f04388d7 100644 --- a/doc/CHANGELOG.es.txt +++ b/doc/CHANGELOG.es.txt @@ -7,6 +7,7 @@ Lista de cambios incluidos en OpenGnsys 1.1.1 (Espeto) ------------------------------------------------------ Tickets resueltos en módulo OpenGnsys Cloning Engine: +#853 Revisar autodocumentación con doxygen #863 smartPartition: incluir scritps de ejemplo de particionado personalizado para múltiples d iscos duros #864 FirstRunOnceWindows: scripts de ejemplo para installMiniSetup con ratón y teclado desacti @@ -16,6 +17,13 @@ vado Tickets resueltos en módulo OpenGnsys Client: #847 La ISO del ogLive debe de utilzar la revisión de Git y no de SVN +Tickets resueltos en módulo OpenGnsys Server: +#856 Mejoras en setserveraddr + +Tickets resueltos en módulo OpenGnsys Repository Server: +#873 Script para importar imagen de otro repositorio +#875 Eliminar el servicio inactivo ogAdmRepo + Tickets resueltos en módulo OpenGnsys Web Admin Console: #772 Módulo de administración web para dispositivos smartphones y tablets (no se resolverá) #804 Conversión de todo el código php de la consola web de administración a Php7 y Mysqli (tarea) @@ -24,7 +32,7 @@ Tickets resueltos en módulo OpenGnsys Web Admin Console: #842 Internacionalización de la consola web Tickets resueltos en módulo OpenGnsys Installer: -#784 Mejorar rendimiento de PHP sobre Apache +#784 Mejorar rendimiento de PHP sobre Apache #869 Compatibilidad de servidor con Ubuntu 18.04 LTS y CentOS 7.x Tickets genéricos resueltos: @@ -55,6 +63,9 @@ Tickets resueltos en módulo OpenGnsys Web Admin Console: #867 La ayuda en la consola incluirá más información #870 Netboot avanzado no crea la plantilla de arranque si el equipo no tiene asignado un repositorio (corrección) +Tickets resueltos en módulo OpenGnsys Installer: +#876 Problemas al actualizar desde Subversion a Git (corrección) + Tickets genéricos resueltos: #839 Errores detectado en API REST para Remote PC (corrección) #840 Usar Git como repositorio de código @@ -106,6 +117,7 @@ Tickets resueltos en módulo OpenGnsys Client: #774 Soportar clientes ogLive de 64 bits #783 Browser registra salida de comandos ejecutados al pulsar enlace (mejora) #786 Adaptar el ogLive-precise-3.2.0-23-generic-r4820.iso como ogLive de 32 bits +#788 grubSyntax compatible con grub_probe version 1.99 #813 Restaurar Imagen no muestra el error en la cola de acciones Tickets resueltos en módulo OpenGnsys Server: -- cgit v1.2.3-18-g5258 From 7082c6f1a670f778e8a64eaa6b84a0175fbd1e8f Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Wed, 21 Nov 2018 14:32:49 +0100 Subject: #872 Mejora en el log en tiempo real del asistente de particionado. --- admin/WebConsole/asistentes/jscripts/asistentes.js | 80 ++++++++-------------- 1 file changed, 28 insertions(+), 52 deletions(-) diff --git a/admin/WebConsole/asistentes/jscripts/asistentes.js b/admin/WebConsole/asistentes/jscripts/asistentes.js index a7bec7d2..59446868 100644 --- a/admin/WebConsole/asistentes/jscripts/asistentes.js +++ b/admin/WebConsole/asistentes/jscripts/asistentes.js @@ -144,7 +144,7 @@ function codeParticionadoMSDOS (form) { var partCode=""; var logicalCode=""; var sizecacheCode=""; - var cacheCode; + var cacheCode=""; var cacheSize; var extended=false; var n_disk = form.n_disk.value; @@ -203,13 +203,8 @@ function codeParticionadoMSDOS (form) { if (form.size4.value == "0") { sizecacheCode="\ ogEcho session \"[20] $MSG_HELP_ogGetCacheSize\"\n \ -sizecache=`ogGetCacheSize` \n "; +sizecache=`ogGetCacheSize` "; cacheCode="\ -ogEcho session \"[30] $MSG_HELP_ogUpdatePartitionTable "+n_disk+"\"\n \ -ogCreatePartitionTable "+n_disk+" "+tipo_part_table +" \n \ -ogDeletePartitionTable "+n_disk+" \n \ -ogExecAndLog command ogUpdatePartitionTable "+n_disk+" \n \ -ogEcho session \"[50] $MSG_HELP_ogCreateCache\"\n \ initCache "+n_disk+" $sizecache NOMOUNT &>/dev/null \n "; } else { if (form.size4.value == "CUSTOM") { @@ -218,19 +213,11 @@ initCache "+n_disk+" $sizecache NOMOUNT &>/dev/null \n "; cacheSize = form.size4.value; } cacheCode="\ -ogEcho session \"[30] $MSG_HELP_ogUpdatePartitionTable "+n_disk+"\"\n \ -ogCreatePartitionTable "+n_disk+" "+tipo_part_table +" \n \ -ogDeletePartitionTable "+n_disk+" \n \ -ogUpdatePartitionTable "+n_disk+" \n \ -ogEcho session \"[50] $MSG_HELP_ogCreateCache\"\n \ -initCache " + n_disk + " " + cacheSize + " NOMOUNT &>/dev/null"; +initCache " + n_disk + " " + cacheSize + " NOMOUNT &>/dev/null \n "; } + cacheCode += "ogEcho session \"[60] $MSG_HELP_ogListPartitions "+n_disk+"\" \n "; + cacheCode += "ogExecAndLog command session ogListPartitions "+n_disk+" \n "; } else { - cacheCode="\ -ogEcho session \"[30] $MSG_HELP_ogUpdatePartitionTable "+n_disk+"\"\n \ -ogCreatePartitionTable "+n_disk+" "+tipo_part_table +" \n \ -ogDeletePartitionTable "+n_disk+" \n \ -ogUpdatePartitionTable "+n_disk+" \n"; partCode += " EMPTY:0"; } } @@ -276,8 +263,8 @@ partCode += " EMPTY:0"; // Formateo de la partición swap if (swapPart.length > 0) { for (var i=0; i < swapPart.length; i++) { - swapCode += "ogEcho session log \"$MSG_HELP_ogFormat "+n_disk+" "+swapPart[i]+" LINUX-SWAP \" \n " ; - swapCode += "ogExecAndLog command session log ogFormat "+n_disk+" "+swapPart[i]+" LINUX-SWAP \n "; + swapCode += " ogEcho session log \"[95] $MSG_HELP_ogFormat "+n_disk+" "+swapPart[i]+" LINUX-SWAP \"\n " ; + swapCode += " ogExecAndLog command ogFormat "+n_disk+" "+swapPart[i]+" LINUX-SWAP \n "; } } @@ -287,17 +274,19 @@ partCode += " EMPTY:0"; ogEcho session \"[10] $MSG_HELP_ogUnmountAll "+n_disk+"\"\n \ ogUnmountAll "+n_disk+" 2>/dev/null \n \ ogUnmountCache \n \ -" + cacheCode + " \n \ -ogEcho session \"[60] $MSG_HELP_ogListPartitions "+n_disk+"\"\n \ -ogExecAndLog command session ogListPartitions "+n_disk+" \n \ +ogEcho session \"[30] $MSG_HELP_ogUpdatePartitionTable "+n_disk+"\"\n \ +ogCreatePartitionTable "+n_disk+" "+tipo_part_table +" \n \ +ogDeletePartitionTable "+n_disk+" \n \ +ogUpdatePartitionTable "+n_disk+" \n \ +" + cacheCode + "\ ogEcho session \"[70] $MSG_HELP_ogCreatePartitions " + partCode + "\"\n \ -if ogExecAndLog command session ogCreatePartitions "+n_disk+" " + partCode + "; then \n \ +if ogExecAndLog command ogCreatePartitions "+n_disk+" " + partCode + "; then \n \ ogEcho session \"[80] $MSG_HELP_ogSetPartitionActive "+n_disk+" 1\"\n \ ogSetPartitionActive "+n_disk+" 1 \n \ - ogEcho log session \"[100] $MSG_HELP_ogListPartitions "+n_disk+"\"\n \ + ogEcho log session \"[90] $MSG_HELP_ogListPartitions "+n_disk+"\"\n \ ogUpdatePartitionTable "+n_disk+" \n \ ms-sys /dev/sda | grep unknow && ms-sys /dev/sda \n \ - ogExecAndLog command session log ogListPartitions "+n_disk+" \n \ + ogExecAndLog command session log ogListPartitions "+n_disk+" \n\ "+ swapCode +"\ else \n \ ogEcho session log \"[100] ERROR: $MSG_HELP_ogCreatePartitions\" \n \ @@ -329,11 +318,8 @@ function codeParticionadoGPT (form) { if (form.sizeGPT4.value == "0") { sizecacheCode="\ ogEcho session \"[20] $MSG_HELP_ogGetCacheSize\"\n \ -sizecache=`ogGetCacheSize` \n "; +sizecache=`ogGetCacheSize` "; cacheCode="\ -ogEcho session \"[30] $MSG_HELP_ogUpdatePartitionTable "+n_disk+"\"\n \ -ogDeletePartitionTable "+n_disk+" \n \ -ogExecAndLog command ogUpdatePartitionTable "+n_disk+" \n \ ogEcho session \"[50] $MSG_HELP_ogCreateCache\"\n \ initCache "+ n_disk +" $sizecache NOMOUNT &>/dev/null \n "; } else { @@ -343,12 +329,11 @@ initCache "+ n_disk +" $sizecache NOMOUNT &>/dev/null \n "; cacheSize = form.sizeGPT4.value; } cacheCode="\ -ogEcho session \"[30] $MSG_HELP_ogUpdatePartitionTable "+n_disk+"\"\n \ -ogDeletePartitionTable "+n_disk+" \n \ -ogUpdatePartitionTable "+n_disk+" \n \ ogEcho session \"[50] $MSG_HELP_ogCreateCache\"\n \ -initCache " + n_disk +" "+ cacheSize + " NOMOUNT &>/dev/null"; +initCache " + n_disk +" "+ cacheSize + " NOMOUNT &>/dev/null \n "; } + cacheCode += "ogEcho session \"[60] $MSG_HELP_ogListPartitions "+n_disk+"\"\n "; + cacheCode += "ogExecAndLog command session ogListPartitions "+n_disk+" \n "; } else{ var partType=eval("form.partGPT"+nPart); if (partType.value == "CUSTOM" ) { @@ -372,22 +357,14 @@ initCache " + n_disk +" "+ cacheSize + " NOMOUNT &>/dev/null"; } } } else { - if(nPart == 4){ - cacheCode="\ -ogEcho session \"[30] $MSG_HELP_ogUpdatePartitionTable "+n_disk+"\"\n \ -ogDeletePartitionTable "+n_disk+" \n \ -ogUpdatePartitionTable "+n_disk+" \n"; -partCode += " EMPTY:0"; - } else{ - partCode += " EMPTY:0"; - } + partCode += " EMPTY:0"; } } // Formateo de la partición swap if (swapPart.length > 0) { for (var i=0; i < swapPart.length; i++) { - swapCode += " ogEcho session log \"$MSG_HELP_ogFormat "+n_disk+" "+swapPart[i]+" LINUX-SWAP \" \n" ; - swapCode += " ogExecAndLog command session log ogFormat "+n_disk+" "+swapPart[i]+" LINUX-SWAP \n"; + swapCode += " ogEcho session log \"[95] $MSG_HELP_ogFormat "+n_disk+" "+swapPart[i]+" LINUX-SWAP \" \n" ; + swapCode += " ogExecAndLog command ogFormat "+n_disk+" "+swapPart[i]+" LINUX-SWAP \n"; } } @@ -396,16 +373,17 @@ partCode += " EMPTY:0"; ogCreatePartitionTable "+n_disk+" "+tipo_part_table +" \n \ ogEcho log session \"[0] $MSG_HELP_ogCreatePartitions "+n_disk+"\"\n \ ogEcho session \"[10] $MSG_HELP_ogUnmountAll "+n_disk+"\"\n \ -ogUnmountAll "+n_disk+" \n \ +ogUnmountAll "+n_disk+" \n \ ogUnmountCache \n \ -" + cacheCode + " \n \ -ogEcho session \"[60] $MSG_HELP_ogListPartitions "+n_disk+"\"\n \ -ogExecAndLog command session ogListPartitions "+n_disk+" \n \ +ogEcho session \"[30] $MSG_HELP_ogUpdatePartitionTable "+n_disk+"\"\n \ +ogDeletePartitionTable "+n_disk+" \n \ +ogUpdatePartitionTable "+n_disk+" \n \ +" + cacheCode + "\ ogEcho session \"[70] $MSG_HELP_ogCreatePartitions " + partCode + "\"\n \ ogExecAndLog command ogCreatePartitions "+n_disk+" " + partCode + " \n \ ogEcho session \"[80] $MSG_HELP_ogSetPartitionActive "+n_disk+" 1\"\n \ ogSetPartitionActive "+n_disk+" 1 \n \ -ogEcho log session \"[100] $MSG_HELP_ogListPartitions "+n_disk+"\"\n \ +ogEcho log session \"[90] $MSG_HELP_ogListPartitions "+n_disk+"\"\n \ ogUpdatePartitionTable "+n_disk+" \n \ ms-sys /dev/sda | grep unknow && ms-sys /dev/sda \n \ ogExecAndLog command session log ogListPartitions "+n_disk+" \n"; @@ -704,5 +682,3 @@ function checkExtendedPartition(form) { logical.style.visibility="hidden"; } } - - -- cgit v1.2.3-18-g5258 From 2c5d6a31edfc20349078f0ea853bb999045b5004 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Thu, 22 Nov 2018 10:20:15 +0100 Subject: #857: Basic compatibillity notes. --- doc/COMPATIBILITY.en.txt | 25 +++++++++++++++++++++++++ installer/INSTALL.en.txt | 6 +++--- installer/INSTALL.es.txt | 6 +++--- 3 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 doc/COMPATIBILITY.en.txt diff --git a/doc/COMPATIBILITY.en.txt b/doc/COMPATIBILITY.en.txt new file mode 100644 index 00000000..0e79796e --- /dev/null +++ b/doc/COMPATIBILITY.en.txt @@ -0,0 +1,25 @@ + +OpenGnsys 1.1.1 (Espeto) Compatibility Notes +============================================== + + +OpenGnsys Administration Server and Repository Manager +------------------------------------------------------ + +Installation of OpenGnsys services has been tested on the following GNU/Linux distributions: + + - Ubuntu Server 18.04 LTS 64-bit (recommended) + - Ubuntu Server 16.04 LTS 64-bit (not fully tested) + - CentOS 7.5 64-bit (not fully tested) + + +OpenGnsys Clients +----------------- + +Installation and cloning operations have been tested on the following operating systems and filesystems: + + - Ubuntu Desktop 16.04.4 64-bit and 18.04.1 64-bit with Ext4 filesystem and Swap partition + - Windows 7 Enterprise 64-bit with NTFS filesystem + - Windows 10 Education 1709 64-bit and 1803 64-bit with NTFS filesystem + + diff --git a/installer/INSTALL.en.txt b/installer/INSTALL.en.txt index fac27547..23698972 100644 --- a/installer/INSTALL.en.txt +++ b/installer/INSTALL.en.txt @@ -1,10 +1,10 @@ -Installing OpenGnsys Server 1.1.0 -================================= +Installing OpenGnsys Server 1.1.1 (Espeto) +========================================== Before installation ------------------- -OpenGnsys Server 1.1.0 is meant to be installed under Ubuntu Server 16.04 LTS or newer, though it has also been tested under operating systems based on CentOS 7. +OpenGnsys Server 1.1.1 (codename "Espeto") is meant to be installed under Ubuntu Server 16.04 LTS or newer, though it has also been tested under operating systems based on CentOS 7 (read COMPATIBILITY.en.txt for more details). Network connection is needed in order to download the required packages, the source code and the preconfigured client. diff --git a/installer/INSTALL.es.txt b/installer/INSTALL.es.txt index e585a507..b99b1e20 100644 --- a/installer/INSTALL.es.txt +++ b/installer/INSTALL.es.txt @@ -1,10 +1,10 @@ -Instalación de OpenGnsys Server 1.1.0 -===================================== +Instalación de OpenGnsys Server 1.1.1 (Espeto) +============================================== Notas iniciales --------------- -Se presupone que el servidor de OpenGnsys 1.1.0 va a ser instalado en una distribución del sistema operativo Ubuntu Server a partir de la versión 16.04 LTS (también ha sido probado en sistemas basados en CentOS 7). +Se presupone que el servidor de OpenGnsys 1.1.1 (Espeto) debe ser instalado en una distribución del sistema operativo Ubuntu Server a partir de la versión 16.04 LTS, aunque también se está probado en sistemas basados en CentOS 7 (leer el fichero COMPATIBILITY.en.txt para obtener más detalles de compatibilidad). El serividor debe tener acceso a Internet para descargar los paquetes necesarios, el código del proyecto y el cliente preconfigurado. -- cgit v1.2.3-18-g5258 From 12ad7b2a6fcb895985826696a403f302819ef071 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Thu, 22 Nov 2018 13:32:01 +0100 Subject: #870 Al entrar en parte administrativa de la consola no se muestra alerta por no tener repositorio (errata). --- admin/WebConsole/controlpostacceso.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/admin/WebConsole/controlpostacceso.php b/admin/WebConsole/controlpostacceso.php index bfe70d53..01f840d2 100644 --- a/admin/WebConsole/controlpostacceso.php +++ b/admin/WebConsole/controlpostacceso.php @@ -174,6 +174,9 @@ if ($idc != 0) // - idcentro: identificador de la unidad organizativa //_______________________________________________________________________________________________________ function alert_norepo($cmd, $idcentro,$mensaje){ + // Si entramos en la parte administrativo no se muestra mensaje + if ($idcentro == 0) return; + $idrepositorio = ''; $rs=new Recordset; $cmd->texto="SELECT idrepositorio FROM repositorios ". -- cgit v1.2.3-18-g5258 From fdebfdba10e5665ca001da97f81fbcbed843b4a9 Mon Sep 17 00:00:00 2001 From: adv Date: Fri, 23 Nov 2018 11:27:50 +0000 Subject: #851 corregida la comprobación del binario udp-receiver y de los parametros disponibles. Asignar variables internas de la composición del cliente mcast relacionadas con el parámetro en cuestión. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/engine/Protocol.lib | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/client/engine/Protocol.lib b/client/engine/Protocol.lib index f3dbdc5b..2fb45fb4 100755 --- a/client/engine/Protocol.lib +++ b/client/engine/Protocol.lib @@ -339,14 +339,14 @@ fi #@date 2017/04/20 #@version 1.1.0.a - Parametros de clientes como sesision de multicast (ticket #851) #@author Antonio J. Doblas Viso -#@date 2018/09/11 +#@date 2018/09/22 #*/ ## # function ogMcastSyntax () { -local ISUDPCAST RECEIVERTIMEOUT PARM SESSION SESSIONPARM MODE PORTBASE PERROR +local ISUDPCAST RECEIVERTIMEOUT STARTTIMEOUT PARM SESSION SESSIONPARM MODE PORTBASE PERROR local METHOD ADDRESS BITRATE NCLIENTS MAXTIME CERROR local TOOL LEVEL DEVICE MBUFFER SYNTAXSERVER SYNTAXCLIENT @@ -368,7 +368,7 @@ PERROR=0 #si no tenemos updcast o su version superior 2009 udpcast error. ISUDPCAST=$(udp-receiver --help 2>&1) -echo $ISUDPCAST | grep start-timeout > /dev/null || ogRaiseError $OG_ERR_NOTEXEC "upd-cast no existe o version antigua -requerida 2009-"|| return $? +echo $ISUDPCAST | grep "not found" > /dev/null && (ogRaiseError $OG_ERR_NOTEXEC "upd-cast no existe " || return $?) ############ BEGIN NUMBERS PARAMETERS CHECK AND SESSION OPTIONS IF CLIENT OR SERVER ############## # Definimos los parametros de la funcion segun la opcion de envio/recepcion. @@ -446,7 +446,7 @@ SYNTAXSERVER="udp-sender $MBUFFER --nokbd --portbase $PORTBASE --$METHOD --mcast ##### BEGIN CLIENT SESSION ##### #La primera opcion PORTBASE, ya esta controlado. Porque es comun al server y al cliente. #La segunda opcion de la sesion para el cliente:: SERVERADDRES -if ogCheckIpAddress ${SESSION[1]} +if ogCheckIpAddress ${SESSION[1]} 2>/dev/null then SERVERADDRESS=" --mcast-rdv-address ${SESSION[1]}" else @@ -497,39 +497,39 @@ if ogCheckStringInReg ${SESSION[2]} "^[0-9]{1,10}$" &>/dev/null then case ${SESSION[2]} in 0) - ERRORSESSION=" " + STARTTIMEOUT=" " ;; *) - ERRORSESSION=" --start-timeout ${SESSION[2]}" + STARTTIMEOUT=" --start-timeout ${SESSION[2]}" ;; esac else #asignamos valor definido en el engine.cfg - ERRORSESSION=" --start-timeout $MCASTERRORSESSION" + STARTTIMEOUT=" --start-timeout $MCASTERRORSESSION" fi #La cuarta opcion de la sesion para el cliente: ${SESSION[2]} ERROR TRANSFER - TIMEOUT EEOR IF NOT RECEIVER DATA FROM SERVER if ogCheckStringInReg ${SESSION[3]} "^[0-9]{1,10}$" &>/dev/null then case ${SESSION[3]} in 0) - ABORTTRANSMISSION=" " + RECEIVERTIMEOUT=" " ;; *) - ABORTTRANSMISSION=" --receive-timeout ${SESSION[3]}" + RECEIVERTIMEOUT=" --receive-timeout ${SESSION[3]}" ;; esac else #asignamos valor definido en el engine.cfg - ABORTTRANSMISSION=" --receive-timeout $MCASTWAIT" + RECEIVERTIMEOUT=" --receive-timeout $MCASTWAIT" fi #Componenemos la sesion multicast del cliente -SYNTAXCLIENT="udp-receiver $MBUFFER --portbase $PORTBASE $SERVERADDRESS $ERRORSESSION $ABORTTRANSMISSION --log /tmp/mcast.log" +SYNTAXCLIENT="udp-receiver $MBUFFER --portbase $PORTBASE $SERVERADDRESS $STARTTIMEOUT $RECEIVERTIMEOUT --log /tmp/mcast.log" ########################################################################## #### END CLIENT SESSION ############## ######## BEGIN MAIN PROGAM ##### case "$1" in -SENDPARTITION) + SENDPARTITION) PROG1=`ogCreateImageSyntax $DEVICE " " $TOOL $LEVEL | awk -F"|" '{print $1 "|" $3}' | tr -d ">"` echo "$PROG1 | $SYNTAXSERVER" ;; -- cgit v1.2.3-18-g5258 From 703551b3b7aca9bf0b29ef55fa7e2ded00eb4462 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Fri, 23 Nov 2018 13:08:38 +0100 Subject: #877: Copy hosts file on OGAgent activation, and some code cleanup. --- .../ogagent/src/opengnsys/linux/operations.py | 8 +++ .../ogagent/src/opengnsys/macos/operations.py | 8 +++ .../opengnsys/modules/server/OpenGnSys/__init__.py | 78 ++++++++++++---------- .../ogagent/src/opengnsys/windows/operations.py | 8 +++ server/bin/ogagentqueue.cron | 6 +- 5 files changed, 71 insertions(+), 37 deletions(-) diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/linux/operations.py b/admin/Sources/Clients/ogagent/src/opengnsys/linux/operations.py index f9534d6a..0c08f95f 100644 --- a/admin/Sources/Clients/ogagent/src/opengnsys/linux/operations.py +++ b/admin/Sources/Clients/ogagent/src/opengnsys/linux/operations.py @@ -284,3 +284,11 @@ def showPopup(title, message): Displays a message box on user's session (during 1 min). ''' return subprocess.call('zenity --info --timeout 60 --title "{}" --text "{}"'.format(title, message), shell=True) + + +def get_etc_path(): + """ + :return: + Returns etc directory path. + """ + return os.sep + 'etc' diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/macos/operations.py b/admin/Sources/Clients/ogagent/src/opengnsys/macos/operations.py index ea835cea..286b6d89 100644 --- a/admin/Sources/Clients/ogagent/src/opengnsys/macos/operations.py +++ b/admin/Sources/Clients/ogagent/src/opengnsys/macos/operations.py @@ -253,3 +253,11 @@ def showPopup(title, message): ''' # Show a dialog using AppleSctipt return subprocess.call('/usr/bin/osascript -e \'display notification "{}" with title "{}"\''.format(message, title), shell=True) + + +def get_etc_path(): + """ + :return: + Returns etc directory path. + """ + return os.sep + 'etc' diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/modules/server/OpenGnSys/__init__.py b/admin/Sources/Clients/ogagent/src/opengnsys/modules/server/OpenGnSys/__init__.py index 1438e469..8ef866ad 100644 --- a/admin/Sources/Clients/ogagent/src/opengnsys/modules/server/OpenGnSys/__init__.py +++ b/admin/Sources/Clients/ogagent/src/opengnsys/modules/server/OpenGnSys/__init__.py @@ -37,6 +37,7 @@ import os import platform import time import random +import shutil import string import urllib @@ -65,9 +66,9 @@ class OpenGnSysWorker(ServerWorker): length = 32 # Random string length def checkSecret(self, server): - ''' + """ Checks for received secret key and raise exception if it isn't valid. - ''' + """ try: if self.random != server.headers['Authorization']: raise Exception('Unauthorized operation') @@ -76,9 +77,9 @@ class OpenGnSysWorker(ServerWorker): raise Exception(e) def onActivation(self): - ''' + """ Sends OGAgent activation notification to OpenGnsys server - ''' + """ self.cmd = None # Ensure cfg has required configuration variables or an exception will be thrown self.REST = REST(self.service.config.get('opengnsys', 'remote')) @@ -104,55 +105,64 @@ class OpenGnSysWorker(ServerWorker): os.remove(os.sep + f) except OSError: pass + # Copy file "HostsFile.FirstOctetOfIPAddress" to "HostsFile", if it exists + # (used in "exam mode" of the University of Seville) + hostsFile = os.path.join(operations.get_etc_path(), 'hosts') + newHostsFile = hostsFile + '.' + self.interface.ip.split('.')[0] + if os.path.isfile(newHostsFile): + shutil.copyfile(newHostsFile, hostsFile) # Generate random secret to send on activation self.random = ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(self.length)) - # Send initalization message + # Send initialization message self.REST.sendMessage('ogagent/started', {'mac': self.interface.mac, 'ip': self.interface.ip, 'secret': self.random, 'ostype': operations.osType, 'osversion': operations.osVersion}) def onDeactivation(self): - ''' + """ Sends OGAgent stopping notification to OpenGnsys server - ''' + """ logger.debug('onDeactivation') self.REST.sendMessage('ogagent/stopped', {'mac': self.interface.mac, 'ip': self.interface.ip, 'ostype': operations.osType, 'osversion': operations.osVersion}) def processClientMessage(self, message, data): logger.debug('Got OpenGnsys message from client: {}, data {}'.format(message, data)) - def onLogin(self, userData): - ''' + def onLogin(self, data): + """ Sends session login notification to OpenGnsys server - ''' - user, sep, language = userData.partition(',') + """ + user, sep, language = data.partition(',') logger.debug('Received login for {} with language {}'.format(user, language)) self.loggedin = True self.REST.sendMessage('ogagent/loggedin', {'ip': self.interface.ip, 'user': user, 'language': language, 'ostype': operations.osType, 'osversion': operations.osVersion}) def onLogout(self, user): - ''' + """ Sends session logout notification to OpenGnsys server - ''' + """ logger.debug('Received logout for {}'.format(user)) self.loggedin = False self.REST.sendMessage('ogagent/loggedout', {'ip': self.interface.ip, 'user': user}) def process_ogclient(self, path, getParams, postParams, server): - ''' - This method can be overriden to provide your own message proccessor, or better you can - implement a method that is called exactly as "process_" + path[0] (module name has been removed from path array) and this default processMessage will invoke it + """ + This method can be overridden to provide your own message processor, or better you can + implement a method that is called exactly as "process_" + path[0] (module name has been removed from path + array) and this default processMessage will invoke it * Example: Imagine this invocation url (no matter if GET or POST): http://example.com:9999/Sample/mazinger/Z The HTTP Server will remove "Sample" from path, parse arguments and invoke this method as this: module.processMessage(["mazinger","Z"], getParams, postParams) - This method will process "mazinger", and look for a "self" method that is called "process_mazinger", and invoke it this way: + This method will process "mazinger", and look for a "self" method that is called "process_mazinger", + and invoke it this way: return self.process_mazinger(["Z"], getParams, postParams) - In the case path is empty (that is, the path is composed only by the module name, like in "http://example.com/Sample", the "process" method - will be invoked directly + In the case path is empty (that is, the path is composed only by the module name, like in + "http://example.com/Sample", the "process" method will be invoked directly - The methods must return data that can be serialized to json (i.e. Ojects are not serializable to json, basic type are) - ''' + The methods must return data that can be serialized to json (i.e. Objects are not serializable to json, + basic type are) + """ if not path: return "ok" try: @@ -162,9 +172,9 @@ class OpenGnSysWorker(ServerWorker): return operation(path[1:], getParams, postParams) def process_status(self, path, getParams, postParams, server): - ''' + """ Returns client status. - ''' + """ res = {'status': '', 'loggedin': self.loggedin} if platform.system() == 'Linux': # GNU/Linux # Check if it's OpenGnsys Client. @@ -185,9 +195,9 @@ class OpenGnSysWorker(ServerWorker): return res def process_reboot(self, path, getParams, postParams, server): - ''' + """ Launches a system reboot operation. - ''' + """ logger.debug('Received reboot operation') self.checkSecret(server) # Rebooting thread. @@ -197,9 +207,9 @@ class OpenGnSysWorker(ServerWorker): return {'op': 'launched'} def process_poweroff(self, path, getParams, postParams, server): - ''' + """ Launches a system power off operation. - ''' + """ logger.debug('Received poweroff operation') self.checkSecret(server) # Powering off thread. @@ -210,9 +220,9 @@ class OpenGnSysWorker(ServerWorker): return {'op': 'launched'} def process_script(self, path, getParams, postParams, server): - ''' + """ Processes an script execution (script should be encoded in base64) - ''' + """ logger.debug('Processing script request') self.checkSecret(server) # Decoding script. @@ -227,19 +237,19 @@ class OpenGnSysWorker(ServerWorker): return {'op': 'launched'} def process_logoff(self, path, getParams, postParams, server): - ''' + """ Closes user session. - ''' + """ logger.debug('Received logoff operation') self.checkSecret(server) # Sending log off message to OGAgent client. self.sendClientMessage('logoff', {}) - return {'op': 'sended to client'} + return {'op': 'sent to client'} def process_popup(self, path, getParams, postParams, server): - ''' + """ Shows a message popup on the user's session. - ''' + """ logger.debug('Received message operation') self.checkSecret(server) # Sending popup message to OGAgent client. diff --git a/admin/Sources/Clients/ogagent/src/opengnsys/windows/operations.py b/admin/Sources/Clients/ogagent/src/opengnsys/windows/operations.py index aa83c943..95331fd0 100644 --- a/admin/Sources/Clients/ogagent/src/opengnsys/windows/operations.py +++ b/admin/Sources/Clients/ogagent/src/opengnsys/windows/operations.py @@ -259,3 +259,11 @@ def showPopup(title, message): Displays a message box on user's session (during 1 min). ''' return subprocess.call('mshta "javascript:var sh=new ActiveXObject(\'WScript.Shell\'); sh.Popup( \'{}\', 60, \'{}\', 64); close()"'.format(message.encode('unicode_escape'), title.encode('unicode_escape')), shell=True) + + +def get_etc_path(): + """ + :return: + Returns etc directory path. + """ + return os.path.join('C:', os.sep, 'Windows', 'System32', 'drivers', 'etc') diff --git a/server/bin/ogagentqueue.cron b/server/bin/ogagentqueue.cron index 0cf0dd5d..d44efdff 100755 --- a/server/bin/ogagentqueue.cron +++ b/server/bin/ogagentqueue.cron @@ -77,10 +77,10 @@ SELECT ogagent_queue.id, ogagent_queue.exectime, ogagent_queue.operation, if [ -n "$AGNTURL" ]; then CODE=$(curl -ksm 1 -w "%{http_code}" -o /dev/null -H "Authorization: $AGNTKEY" ${DATA:+"-d $DATA"} "$AGNTURL") case "$CODE" in - 000) # Client does not respond may be halted). + 000) # Client does not respond (may be halted). ;; - 200) # Operation sended. - echo "$(date +"%FT%T%z"): $PROG: Operation sended to OGAgent: client=$AGNTIP, oper=$OPER, exectime=\"$DATE $TIME\"" >> $LOGFILE ;; + 200) # Operation sent. + echo "$(date +"%FT%T%z"): $PROG: Operation sent to OGAgent: client=$AGNTIP, oper=$OPER, exectime=\"$DATE $TIME\"" >> $LOGFILE ;; *) # Operation error. echo "$(date +"%FT%T%z"): $PROG: Operation error: client=$AGNTIP, oper=$OPER, code=$CODE" >> $LOGFILE ;; esac -- cgit v1.2.3-18-g5258 From 59d66700b6878cc57b28f12c21bbb43a38f0871f Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Fri, 23 Nov 2018 14:41:33 +0100 Subject: #846: Remove appropiate logrotate files when uninstalling or updating. --- installer/opengnsys_uninstall.sh | 1 + installer/opengnsys_update.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/installer/opengnsys_uninstall.sh b/installer/opengnsys_uninstall.sh index a9cde989..264ef71e 100755 --- a/installer/opengnsys_uninstall.sh +++ b/installer/opengnsys_uninstall.sh @@ -115,6 +115,7 @@ for dir in $OPENGNSYS/*; do done rm -f /etc/init.d/opengnsys /etc/default/opengnsys /var/log/opengnsys rm -f /etc/cron.d/{opengnsys,torrentcreator,torrenttracker} +rm -f /etc/logrotate.d/opengnsys* # Elminar recursos de OpenGnsys en Samba. rm -f /etc/samba/smb-og.conf perl -ni -e "print unless /smb-og.conf/" /etc/samba/smb.conf diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index c43dc8fc..a522434a 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -1043,8 +1043,9 @@ function checkFiles() echoAndLog "${FUNCNAME}(): Deleting unused files" rm -f /tmp/dstate fi - # Crear ficheros de logrotate. + # Crear nuevos ficheros de logrotate y borrar el fichero antiguo. if [ -d $LOGROTATEDIR ]; then + rm -f $LOGROTATEDIR/opengnsys if [ ! -f $LOGROTATEDIR/opengnsysServer ]; then echoAndLog "${FUNCNAME}(): Creating logrotate configuration file for server" sed -e "s/OPENGNSYSDIR/${INSTALL_TARGET//\//\\/}/g" \ -- cgit v1.2.3-18-g5258 From 518d4d84f755185f224c82d5cc3f49b350af4b05 Mon Sep 17 00:00:00 2001 From: adv Date: Sun, 25 Nov 2018 22:17:55 +0000 Subject: #851 fix check parameteres available in udp-receiver --- client/engine/Protocol.lib | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/engine/Protocol.lib b/client/engine/Protocol.lib index 2fb45fb4..279961a5 100755 --- a/client/engine/Protocol.lib +++ b/client/engine/Protocol.lib @@ -507,6 +507,9 @@ else #asignamos valor definido en el engine.cfg STARTTIMEOUT=" --start-timeout $MCASTERRORSESSION" fi +#Verificamos que la opcion start-time out esta soportada por la version del cliente +echo $ISUDPCAST | grep start-timeout > /dev/null || STARTTIMEOUT=" " + #La cuarta opcion de la sesion para el cliente: ${SESSION[2]} ERROR TRANSFER - TIMEOUT EEOR IF NOT RECEIVER DATA FROM SERVER if ogCheckStringInReg ${SESSION[3]} "^[0-9]{1,10}$" &>/dev/null then @@ -522,6 +525,9 @@ else #asignamos valor definido en el engine.cfg RECEIVERTIMEOUT=" --receive-timeout $MCASTWAIT" fi +#Verificamos que la opcion receive-timeou esta soportada por la version del cliente +echo $ISUDPCAST | grep receive-timeout > /dev/null || RECEIVERTIMEOUT=" " + #Componenemos la sesion multicast del cliente SYNTAXCLIENT="udp-receiver $MBUFFER --portbase $PORTBASE $SERVERADDRESS $STARTTIMEOUT $RECEIVERTIMEOUT --log /tmp/mcast.log" ########################################################################## -- cgit v1.2.3-18-g5258