1 | #!/bin/bash |
---|
2 | |
---|
3 | |
---|
4 | |
---|
5 | #Este scripts llama directamente a la función ogMcastSendFile $1 $2 |
---|
6 | #1 path absoluto del fichero. |
---|
7 | #2 la session multicast. |
---|
8 | # ogMcastSendFile [ str_repo | int_ndisk int_npart ] /Relative_path_file sessionMulticast |
---|
9 | #@brief Envía un fichero por multicast ORIGEN(fichero) DESTINO(sessionmulticast) |
---|
10 | #@param (2 parámetros) $1 path_aboluto_fichero $2 sesionMcast |
---|
11 | |
---|
12 | |
---|
13 | |
---|
14 | export OPENGNSYS="${OPENGNSYS:-/opt/opengnsys/client}" |
---|
15 | export OGBIN=$OPENGNSYS/bin |
---|
16 | export OGETC=$OPENGNSYS/etc |
---|
17 | export OGLIB=$OPENGNSYS/lib |
---|
18 | export OGAPI=$OGLIB/engine/bin |
---|
19 | export OGSCRIPTS=$OPENGNSYS/scripts |
---|
20 | export OGIMG=$OPENGNSYS/images |
---|
21 | export OGCAC=$OPENGNSYS/cache |
---|
22 | export OGLOG=$OPENGNSYS/log |
---|
23 | |
---|
24 | for i in $OGAPI/*.lib; do |
---|
25 | . $i |
---|
26 | done |
---|
27 | |
---|
28 | if [ "$engine" = "testing" ] |
---|
29 | then |
---|
30 | for i in $OGAPI/*.testing; do |
---|
31 | . $i |
---|
32 | done |
---|
33 | fi |
---|
34 | |
---|
35 | export PATH=$PATH:/opt/opengnsys/bin |
---|
36 | |
---|
37 | export OG_ERR_FORMAT=1 # Formato de ejecución incorrecto. |
---|
38 | export OG_ERR_NOTFOUND=2 # Fichero o dispositivo no encontrado. |
---|
39 | export OG_ERR_PARTITION=3 # Error en partición de disco. |
---|
40 | export OG_ERR_LOCKED=4 # Partición o fichero bloqueado. |
---|
41 | export OG_ERR_IMAGE=5 # Error al crear o restaurar una imagen. |
---|
42 | export OG_ERR_NOTOS=6 # Sin sistema operativo. |
---|
43 | export OG_ERR_NOTEXEC=7 # Programa o función no ejecutable. |
---|
44 | |
---|
45 | |
---|
46 | |
---|
47 | # Si se solicita, mostrar ayuda. |
---|
48 | if [ "$*" == "help" ]; then |
---|
49 | ogHelp "sendFileMcast /absolute_path_file sesionMcast" \ |
---|
50 | "sendFileMcast /opt/opengnsys/images/aula1/hd500.vmx 9000:full-duplex:239.194.17.2:70M:20:300" |
---|
51 | exit 0 |
---|
52 | fi |
---|
53 | |
---|
54 | # los demas errores controlados por la funcion ogMcastSendFile |
---|
55 | |
---|
56 | ogMcastSendFile $1 $2 |
---|