diff options
author | adv <adv@uma.es> | 2012-01-22 21:21:22 +0000 |
---|---|---|
committer | adv <adv@uma.es> | 2012-01-22 21:21:22 +0000 |
commit | e272d9e0daceefa365204435ca313dc6ade6c985 (patch) | |
tree | a6055177e2914d3b9337d21f7a0bb690cb3b2d29 /admin/Interface/CrearImagen | |
parent | fe08e1b92acaf0e92f081ac94add3cdf4e5b05aa (diff) |
#477 internacionalización de creacion y restauracion -interface, scripts-
git-svn-id: https://opengnsys.es/svn/branches/version1.0@2458 a21b9725-9963-47de-94b9-378ad31fedc9
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 |