summaryrefslogtreecommitdiffstats
path: root/admin/Sources/Services
diff options
context:
space:
mode:
authoradv <adv@uma.es>2011-04-14 20:09:27 +0000
committeradv <adv@uma.es>2011-04-14 20:09:27 +0000
commite8460d24b1f422ee143e401cda13049f586370bf (patch)
tree28c19ddad4fe46f8240303161e6e1bcdb4774f72 /admin/Sources/Services
parentc4cdab6bdc609811e5673ddec35bcd76687c8894 (diff)
version1.0 #369 controlando errores de inicio de multicast
git-svn-id: https://opengnsys.es/svn/branches/version1.0@1863 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/Sources/Services')
-rwxr-xr-xadmin/Sources/Services/ogAdmRepoAux28
1 files changed, 25 insertions, 3 deletions
diff --git a/admin/Sources/Services/ogAdmRepoAux b/admin/Sources/Services/ogAdmRepoAux
index ddbe07ef..9dd4b0bb 100755
--- a/admin/Sources/Services/ogAdmRepoAux
+++ b/admin/Sources/Services/ogAdmRepoAux
@@ -1,10 +1,22 @@
#!/bin/bash
PARM=`cat`
+#TODO: ticket 379
+#buscar parametro de identificador de operacion.
+#usar parametro de identificacion para anexarlo al nombre de log
+#Comprobar si la variable está seteas.
+#Si no lo está setearla.
+#Si esta seteada (en progreso) salir.
+
+
+
BASEDIR=/opt/opengnsys
REPONAME=ogAdmRepo
REPOLOG=$BASEDIR/log/$REPONAME.log
+MCASTLOGBASE=$BASEDIR/log/mcastlog
+MCASTLOG=$MCASTLOGBASE/ogAdmRepoMcast.`date +%Y%m%d-%H%M%S`
+mkdir -p $MCASTLOGBASE
PARM1=$(echo $PARM | cut -f1 -d" ")
PARM2=$(echo $PARM | cut -f2 -d" ")
@@ -19,9 +31,19 @@ case $PARM1 in
#3 opciones de multicast
FILE=/opt/opengnsys/images$PARM2
MCASTOPT=$PARM3
- echo "/opt/opengnsys/bin/sendFileMcast $FILE $MCASTOPT" >> $REPOLOG
- /opt/opengnsys/bin/sendFileMcast $FILE $MCASTOPT >> $REPOLOG
- echo $? >> $REPOLOG
+ echo `date +%Y%m%d-%H%M%S` "/opt/opengnsys/bin/sendFileMcast $FILE $MCASTOPT" >> $REPOLOG
+ /opt/opengnsys/bin/sendFileMcast $FILE $MCASTOPT &>> $MCASTLOG
+ case $? in
+ 1)
+ echo `date +%Y%m%d-%H%M%S` Parametros insuficientes >> $REPOLOG
+ ;;
+ 2)
+ echo `date +%Y%m%d-%H%M%S` Fichero no accesible >> $REPOLOG
+ ;;
+ 3)
+ echo `date +%Y%m%d-%H%M%S` sesion multicast no valida >> $REPOLOG
+ ;;
+ esac
;;
default)
echo "Solicitud con parametros: - $PARM - no realizada: No registrada o con errores" >> $REPOLOG