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). |
---|
[d10549b] | 4 | # Formato: listSoftwareInfo [-r] ndisk npart |
---|
| 5 | # -r listado reducido (sin parches) |
---|
[ea7186c] | 6 | |
---|
| 7 | PROG="$(basename $0)" |
---|
[d10549b] | 8 | REDUCED="no" |
---|
[ea7186c] | 9 | if [ $# -ne 2 ]; then |
---|
| 10 | ogRaiseError $OG_ERR_FORMAT "$MSG_FORMAT: $PROG ndisco nparticion" |
---|
| 11 | exit $? |
---|
| 12 | fi |
---|
| 13 | |
---|
[26c8bfd] | 14 | # Directorio del servidor donde se exportan los ficheros de registro. |
---|
| 15 | SERVERLOGDIR=$(mount | awk -v d=$OGLOG ' |
---|
| 16 | BEGIN {FS="[: ]"} |
---|
| 17 | {if ($4==d) dir=$2} |
---|
| 18 | END {print dir}') |
---|
| 19 | # Fichero de listado: soft-IP-ndisco-npart |
---|
| 20 | SOFTFILE="soft-$(ogGetIpAddress)-$1-$2" |
---|
[ea7186c] | 21 | # Redirigir salida al fichero de listado. |
---|
[d10549b] | 22 | if [ "$REDUCED" = "no" ]; then |
---|
| 23 | ogListSoftware "$1" "$2" >$OGLOG/$SOFTFILE || exit $? |
---|
| 24 | else |
---|
| 25 | ogListSoftware "$1" "$2" | egrep -v "\(KB[0-9]{6}\)" >$OGLOG/$SOFTFILE || exit $? |
---|
| 26 | fi |
---|
[26c8bfd] | 27 | # Salid: camino del fichero de listado en el servidor de repositorio. |
---|
| 28 | echo $SERVERLOGDIR/$SOFTFILE |
---|
[6654a24] | 29 | |
---|
Note: See
TracBrowser
for help on using the repository browser.