918-git-images-111dconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacion
Rev | Line | |
---|
[893ebb02] | 1 | #!/bin/bash |
---|
[b0bb14f] | 2 | # Scirpt de ejemplo para almacenear en fichero temporal el listado de hardware. |
---|
[5b825b50] | 3 | # Nota: se usa como base para el programa de recogida de listado de hardware de OpenGnsys Admin. |
---|
[b0bb14f] | 4 | # Formato: listHardwareInfo |
---|
| 5 | |
---|
[5b825b50] | 6 | PROG=$(basename "$0") |
---|
[b0bb14f] | 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. |
---|
[f2b3250] | 23 | #echo $SERVERLOGDIR/$HARDFILE |
---|
| 24 | echo $OGLOG/$HARDFILE |
---|
Note: See
TracBrowser
for help on using the repository browser.