diff options
author | ramon <ramongomez@us.es> | 2010-07-27 09:32:23 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2010-07-27 09:32:23 +0000 |
commit | fd11e20dc81023f93f1286785b51e92301040495 (patch) | |
tree | bbce8bdd99538f99caa7f920d1ada6e6876616e2 /repoman/bin | |
parent | 199bdf3ede0770820597f36ac372453ad8b259a2 (diff) |
Comprobación de parámetros en script {{{sendFileMcast}}}.
git-svn-id: https://opengnsys.es/svn/trunk@1111 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'repoman/bin')
-rwxr-xr-x | repoman/bin/sendFileMcast | 16 |
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'" |