diff options
author | ramon <ramongomez@us.es> | 2017-12-27 12:50:13 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2017-12-27 12:50:13 +0000 |
commit | 39db3a1a306a396aa73e8d816beec5a720e06be1 (patch) | |
tree | 4c5c13e9e97ae002ec29400d698df62d93dee6d8 /client | |
parent | ef5025f5c01cd7b2654da5f4f9fa281a483da340 (diff) |
#730: Evitar algunos avisos de PHP por vaariable no definida y añadir mensajes de ayuda restantes en funciones.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5545 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client')
-rwxr-xr-x | client/engine/Protocol.lib | 10 | ||||
-rwxr-xr-x | client/engine/System.lib | 12 |
2 files changed, 21 insertions, 1 deletions
diff --git a/client/engine/Protocol.lib b/client/engine/Protocol.lib index 20e4a723..a7c80974 100755 --- a/client/engine/Protocol.lib +++ b/client/engine/Protocol.lib @@ -784,11 +784,19 @@ fi function ogMcastRequest { # Variables locales local FILE PROTOOPT PORT PORTAUX REPOIP REPOPORTAUX REPEAT OGUNIT + +# Si se solicita, mostrar ayuda. +if [ "$*" == "help" ]; then + ogHelp "$FUNCNAME" "$FUNCNAME path_filename str_mcastoptions" + return +fi +# Error si no se reciben 2 parámetros. +[ "$#" == 2 ] || ogRaiseError $OG_ERR_FORMAT || return $? + OGUNIT="$(df|awk '/ogimages/ {print $1}'|cut -d/ -f5)/" FILE="$OGUNIT$1" PROTOOPT="$2" -#TODO AYUDA #TODO: CONTROL PARAMETROS PORT=$(echo $2 | cut -f1 -d":") diff --git a/client/engine/System.lib b/client/engine/System.lib index 50924769..d016be13 100755 --- a/client/engine/System.lib +++ b/client/engine/System.lib @@ -190,6 +190,12 @@ function ogRaiseError () { # Variables locales local CONT=1 LOGS MSG CODE FUNCS +# Si se solicita, mostrar ayuda. +if [ "$*" == "help" ]; then + ogHelp "$FUNCNAME" "$FUNCNAME [str_logfile ...] int_errorcode str_errormessage" + return +fi + # Selección de rgistros de incidencias. while [ $CONT ]; do case "${1,,}" in @@ -269,6 +275,12 @@ function ogIsRepoLocked () # Variables locales. local f FILES +# Si se solicita, mostrar ayuda. +if [ "$*" == "help" ]; then + ogHelp "$FUNCNAME" "$FUNCNAME" "if $FUNCNAME; then ...; fi" + return +fi + # No hacer nada, si no está definido el punto de montaje del repositorio. [ -z "$OGIMG" ] && return 1 |