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
Rev | Line | |
---|
[a2a8296] | 1 | #!/bin/bash |
---|
[ea7186c] | 2 | # Scirpt de ejemplo para almacenear en fichero temporal el listado de software. |
---|
| 3 | # (puede usarse como base para el programa de arranque usado por OpenGNSys Admin). |
---|
| 4 | |
---|
| 5 | PROG="$(basename $0)" |
---|
| 6 | if [ $# -ne 2 ]; then |
---|
| 7 | ogRaiseError $OG_ERR_FORMAT "$MSG_FORMAT: $PROG ndisco nparticion" |
---|
| 8 | exit $? |
---|
| 9 | fi |
---|
| 10 | |
---|
[26c8bfd] | 11 | # Directorio del servidor donde se exportan los ficheros de registro. |
---|
| 12 | SERVERLOGDIR=$(mount | awk -v d=$OGLOG ' |
---|
| 13 | BEGIN {FS="[: ]"} |
---|
| 14 | {if ($4==d) dir=$2} |
---|
| 15 | END {print dir}') |
---|
| 16 | # Fichero de listado: soft-IP-ndisco-npart |
---|
| 17 | SOFTFILE="soft-$(ogGetIpAddress)-$1-$2" |
---|
[ea7186c] | 18 | # Redirigir salida al fichero de listado. |
---|
[26c8bfd] | 19 | ogListSoftware "$1" "$2" >$OGLOG/$SOFTFILE || exit $? |
---|
| 20 | # Salid: camino del fichero de listado en el servidor de repositorio. |
---|
| 21 | echo $SERVERLOGDIR/$SOFTFILE |
---|
Note: See
TracBrowser
for help on using the repository browser.