source: repoman/bin/sendFileMcast @ cc2032b

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
Last change on this file since cc2032b was 85b029f, checked in by ramon <ramongomez@…>, 15 years ago

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

  • Property mode set to 100755
File size: 1.1 KB
Line 
1#!/bin/bash
2#@brief   Envía un fichero por multicast   ORIGEN(fichero) DESTINO(sessionmulticast)
3#@param   path_file      Camino completo del fichero a enviar
4#@param   str_session    Datos de sesión (Puerto:Duplex:IP:Mpbs:Nclientes:Timeout)
5
6
7PROG=$(basename $0)
8 
9# Si se solicita, mostrar ayuda.
10if [ "$*" == "help" ]; then
11    echo "Formato: $PROG fichero datosMulticast"
12    echo "Ejemplo: $PROG /opt/opengnsys/images/PS1_PH1.img 9000:full-duplex:239.194.17.2:70M:20:300"
13    exit 0
14fi
15# Error si no se reciben 2 parámetros.
16if [ $# -ne 2 ]; then
17    echo "Error: Formato: $PROG fichero datosMulticast" >&2
18    exit 1
19fi
20
21# Parámetros de sesión separado por ":".
22OIFS=$IFS; IFS=':'
23read -e PORTBASE METHOD ADDRESS BITRATE NCLIENTS MAXTIME <<<"$2"
24IFS=$OIFS
25
26# FIXME  Comprobación consistencia de parámetros.
27
28# Envío de fichero por Multicast.
29which mbuffer &> /dev/null && MBUFFER="--pipe 'mbuffer -m 20M'"
30udp-sender $MBUFFER --portbase $PORTBASE --$METHOD --mcast-data-address $ADDRESS --fec $CERROR --max-bitrate $BITRATE --ttl 1 --min-clients $NCLIENTS --max-wait $MAXTIME --file "$1"
31
32
Note: See TracBrowser for help on using the repository browser.