diff options
author | ramon <ramongomez@us.es> | 2010-07-07 11:37:49 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2010-07-07 11:37:49 +0000 |
commit | 85b029fc5e9d58ebe148ecda67f76fc26f8d78cc (patch) | |
tree | 63658dc60e29a3552aaf95f83134147b96549a43 /repoman/bin | |
parent | 52ead998ef543ce16393b06e5c40b7fd542eb662 (diff) |
Scripts de gestión de repositorio independientes de la API del motor de clonación.
git-svn-id: https://opengnsys.es/svn/trunk@1085 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'repoman/bin')
-rwxr-xr-x | repoman/bin/sendFileMcast | 32 | ||||
-rwxr-xr-x | repoman/bin/udp-sender | bin | 0 -> 56836 bytes |
2 files changed, 32 insertions, 0 deletions
diff --git a/repoman/bin/sendFileMcast b/repoman/bin/sendFileMcast new file mode 100755 index 00000000..a06d15e8 --- /dev/null +++ b/repoman/bin/sendFileMcast @@ -0,0 +1,32 @@ +#!/bin/bash +#@brief Envía un fichero por multicast ORIGEN(fichero) DESTINO(sessionmulticast) +#@param path_file Camino completo del fichero a enviar +#@param str_session Datos de sesión (Puerto:Duplex:IP:Mpbs:Nclientes:Timeout) + + +PROG=$(basename $0) + +# Si se solicita, mostrar ayuda. +if [ "$*" == "help" ]; then + echo "Formato: $PROG fichero datosMulticast" + echo "Ejemplo: $PROG /opt/opengnsys/images/PS1_PH1.img 9000:full-duplex:239.194.17.2:70M:20:300" + exit 0 +fi +# Error si no se reciben 2 parámetros. +if [ $# -ne 2 ]; then + echo "Error: Formato: $PROG fichero datosMulticast" >&2 + exit 1 +fi + +# Parámetros de sesión separado por ":". +OIFS=$IFS; IFS=':' +read -e PORTBASE METHOD ADDRESS BITRATE NCLIENTS MAXTIME <<<"$2" +IFS=$OIFS + +# FIXME Comprobación consistencia de parámetros. + +# Envío de fichero por Multicast. +which mbuffer &> /dev/null && MBUFFER="--pipe 'mbuffer -m 20M'" +udp-sender $MBUFFER --portbase $PORTBASE --$METHOD --mcast-data-address $ADDRESS --fec $CERROR --max-bitrate $BITRATE --ttl 1 --min-clients $NCLIENTS --max-wait $MAXTIME --file "$1" + + diff --git a/repoman/bin/udp-sender b/repoman/bin/udp-sender Binary files differnew file mode 100755 index 00000000..87789a05 --- /dev/null +++ b/repoman/bin/udp-sender |