diff options
Diffstat (limited to 'admin/Interface/CrearImagen')
-rwxr-xr-x | admin/Interface/CrearImagen | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/admin/Interface/CrearImagen b/admin/Interface/CrearImagen index 1d59da29..89391ed3 100755 --- a/admin/Interface/CrearImagen +++ b/admin/Interface/CrearImagen @@ -28,23 +28,20 @@ #Códigos de error de la funcion ogCreateImage -TIME1=$SECONDS - -#TODO: revisar las variables. -OGLOGSESSION="${OGLOGSESSION=:-/tmp/session.log}" -OGLOGCOMMAND="${OGLOGCOMMAND=:-/tmp/command.log}" -OGLOGSESSION="/tmp/session.log" -OGLOGCOMMAND="/tmp/command.log" -echo " " > $OGLOGSESSION -echo " " > $OGLOGCOMMAND -echo " " > ${OGLOGCOMMAND}.tmp +TIME1=$SECONDS -# Registro de ejecución -echo $* >> $OGLOGFILE +#Load engine configurator from engine.cfg file. +#Carga el configurador del engine desde el fichero engine.cfg +[ -z $OGENGINECONFIGURATE ] && source /opt/opengnsys/etc/engine.cfg -echo "$*" &>> $OGLOGSESSION | $(tail -n 1 $OGLOGSESSION >> $OGLOGFILE) +# Clear temporary file used as log track by httpdlog +# Limpia los ficheros temporales usados como log de seguimiento para httpdlog +echo " " > $OGLOGSESSION; echo " " > $OGLOGCOMMAND; echo " " > ${OGLOGCOMMAND}.tmp +# Registro de inicio de ejecución +#echo "[START Interface ] Run this command: $0 $*" | tee -a $OGLOGSESSION $OGLOGFILE +echo "$MSG_INTERFACE_START $0 $*" | tee -a $OGLOGSESSION $OGLOGFILE # Solo ejecutable por OpenGnSys Client. PATH=$PATH:$(dirname $0) @@ -80,7 +77,7 @@ fi if [ -f createImage$ogengine ]; then - createImage$ogengine "$1" "$2" "$REPO" /"$3" &>> $OGLOGFILE + createImage$ogengine "$1" "$2" "$REPO" /"$3" &>> $OGLOGCOMMAND else createImage "$1" "$2" "$REPO" /"$3" &>> $OGLOGCOMMAND fi @@ -88,13 +85,17 @@ RETVAL=$? [ "$REPO" == "REPO" -a "$boot" != "admin" ] && CambiarAcceso user -if [ $RETVAL == 0 ] -then - rm $OGLOGFILE - touch $OGLOGFILE -else - echo $RETVAL &>> $OGLOGFILE -fi +#if [ $RETVAL == 0 ] +#then +#rm $OGLOGFILE +# touch $OGLOGFILE +#else +# echo $RETVAL &>> $OGLOGFILE +#fi + +# Registro de fin de ejecución +#echo "[END Interface] Command finished with this code: $RETVAL" | tee -a $OGLOGSESSION $OGLOGFILE +echo "$MSG_INTERFACE_END $RETVAL" | tee -a $OGLOGSESSION $OGLOGFILE exit $RETVAL |