From fd11e20dc81023f93f1286785b51e92301040495 Mon Sep 17 00:00:00 2001 From: ramon Date: Tue, 27 Jul 2010 09:32:23 +0000 Subject: Comprobación de parámetros en script {{{sendFileMcast}}}. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://opengnsys.es/svn/trunk@1111 a21b9725-9963-47de-94b9-378ad31fedc9 --- repoman/bin/sendFileMcast | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'repoman') diff --git a/repoman/bin/sendFileMcast b/repoman/bin/sendFileMcast index a06d15e8..a9f9db5e 100755 --- a/repoman/bin/sendFileMcast +++ b/repoman/bin/sendFileMcast @@ -19,11 +19,19 @@ if [ $# -ne 2 ]; then fi # Parámetros de sesión separado por ":". -OIFS=$IFS; IFS=':' -read -e PORTBASE METHOD ADDRESS BITRATE NCLIENTS MAXTIME <<<"$2" -IFS=$OIFS +PARAMS=$(echo $2 | \ + awk -F: '$1~/^[0-9]*$/ {print $1} + tolower($2)~/^(half)(-duplex)?$/ {print "half-duplex"} + tolower($2)~/^(full)(-duplex)?$/ {print "full-duplex"} + $3~/^[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*$/ {print $3} + $4~/^[0-9]*[mM]/ {print $4} + $5~/^[0-9]*/ {print $5} + $6~/^[0-9]*/ {print "$6"} + ') +read -e PORTBASE METHOD ADDRESS BITRATE NCLIENTS MAXTIME <<< $PARAMS -# FIXME Comprobación consistencia de parámetros. +# Valores estandar no configurables. +CERROR="8x8/128" # Envío de fichero por Multicast. which mbuffer &> /dev/null && MBUFFER="--pipe 'mbuffer -m 20M'" -- cgit v1.2.3-18-g5258