close
Warning:
Failed to sync with repository "ogBrowser-Git": (1366, "Incorrect string value: '\\xF0\\x9F\\x93\\xA6 I...' for column 'message' at row 1"); repository information may be out of date. Look in the Trac log for more information including mitigation strategies.
918-git-images-111dconfigfileconfigure-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-instalacionwebconsole3
| Line | |
|---|
| 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.