webconsole3
Last change
on this file since f53877a was
1236d17,
checked in by jm.bardallo <juanmanuel.bardallo@…>, 7 years ago
|
añadidos nuevamente los ficheros de opengnsys del branch devel, se habían quitado por error
|
-
Property mode set to
100644
|
File size:
791 bytes
|
Rev | Line | |
---|
[1236d17] | 1 | #!/bin/bash |
---|
| 2 | # Scirpt de ejemplo para almacenear en fichero temporal el listado de hardware. |
---|
| 3 | # Nota: se usa como base para el programa de recogida de listado de hardware de OpenGnsys Admin. |
---|
| 4 | # Formato: listHardwareInfo |
---|
| 5 | |
---|
| 6 | PROG=$(basename "$0") |
---|
| 7 | if [ $# -ne 0 ]; then |
---|
| 8 | ogRaiseError $OG_ERR_FORMAT "$MSG_FORMAT: $PROG " |
---|
| 9 | exit $? |
---|
| 10 | fi |
---|
| 11 | |
---|
| 12 | # Directorio del servidor donde se exportan los ficheros de registro. |
---|
| 13 | SERVERLOGDIR=$(mount | awk -v d=$OGLOG ' |
---|
| 14 | BEGIN {FS="[: ]"} |
---|
| 15 | {if ($4==d) dir=$2} |
---|
| 16 | END {print dir}') |
---|
| 17 | |
---|
| 18 | # Fichero de listado: hard-IP |
---|
| 19 | HARDFILE="hard-$(ogGetIpAddress)" |
---|
| 20 | # Redirigir salida al fichero de listado. |
---|
| 21 | ogListHardwareInfo>$OGLOG/$HARDFILE || exit $? |
---|
| 22 | # Salida: camino del fichero de listado en el servidor de repositorio. |
---|
| 23 | #echo $SERVERLOGDIR/$HARDFILE |
---|
| 24 | echo $OGLOG/$HARDFILE |
---|
Note: See
TracBrowser
for help on using the repository browser.