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:
1.1 KB
|
Rev | Line | |
---|
[1236d17] | 1 | #!/bin/bash |
---|
| 2 | # Scirpt de ejemplo para almacenear en fichero temporal el listado de software. |
---|
| 3 | # Nota: se usa como base para el programa de recogida de listado de software de OpenGnsys Admin. |
---|
| 4 | # Formato: listSoftwareInfo [-r] ndisk npart |
---|
| 5 | # -r listado reducido (sin parches de Windows) |
---|
| 6 | |
---|
| 7 | PROG=$(basename "$0") |
---|
| 8 | REDUCED="no" |
---|
| 9 | if [ "$1" = "-r" ]; then |
---|
| 10 | REDUCED="yes" |
---|
| 11 | shift |
---|
| 12 | fi |
---|
| 13 | if [ $# -ne 2 ]; then |
---|
| 14 | ogRaiseError $OG_ERR_FORMAT "$MSG_FORMAT: $PROG ndisco nparticion" |
---|
| 15 | exit $? |
---|
| 16 | fi |
---|
| 17 | |
---|
| 18 | # Directorio del servidor donde se exportan los ficheros de registro. |
---|
| 19 | SERVERLOGDIR=$(mount | awk -v d=$OGLOG ' |
---|
| 20 | BEGIN {FS="[: ]"} |
---|
| 21 | {if ($4==d) dir=$2} |
---|
| 22 | END {print dir}') |
---|
| 23 | |
---|
| 24 | # Fichero de listado: soft-IP-ndisco-npart |
---|
| 25 | SOFTFILE="soft-$(ogGetIpAddress)-$1-$2" |
---|
| 26 | # Redirigir salida al fichero de listado. |
---|
| 27 | if [ "$REDUCED" = "no" ]; then |
---|
| 28 | ogListSoftware "$1" "$2" >$OGLOG/$SOFTFILE || exit $? |
---|
| 29 | else |
---|
| 30 | ogListSoftware "$1" "$2" | egrep -v "\(KB[0-9]{6}\)" >$OGLOG/$SOFTFILE || exit $? |
---|
| 31 | fi |
---|
| 32 | # Salid: camino del fichero de listado en el servidor de repositorio. |
---|
| 33 | #echo $SERVERLOGDIR/$SOFTFILE |
---|
| 34 | echo $OGLOG/$SOFTFILE |
---|
| 35 | |
---|
Note: See
TracBrowser
for help on using the repository browser.