summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrepoman/bin/sendFileMcast16
1 files changed, 12 insertions, 4 deletions
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'"