From a6d2a27ac97df1cc6e40e9dbaba5c5f24ed8813c Mon Sep 17 00:00:00 2001 From: ramon Date: Wed, 17 Dec 2014 11:10:07 +0000 Subject: #651: Modificada interfaz {{{CrearImagen}}} para poder llamar a script personalizado de creación {{{createImageCustom}}}, si existe. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://opengnsys.es/svn/branches/version1.0@4461 a21b9725-9963-47de-94b9-378ad31fedc9 --- admin/Interface/CrearImagen | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'admin/Interface') diff --git a/admin/Interface/CrearImagen b/admin/Interface/CrearImagen index ca642845..c3fa9b45 100755 --- a/admin/Interface/CrearImagen +++ b/admin/Interface/CrearImagen @@ -51,14 +51,6 @@ if [ "$CALLER" != "ogAdmClient" ]; then exit $? fi -# Si el origen(pariticion) esta bloqueada salir. - -#if ogIsLocked $1 $2; then -# ogRaiseError $OG_ERR_LOCKED "$MSG_PARTITION, $1 $2" -# exit $? -#fi - - # Valor por defecto para el repositorio. REPO=${4:-"REPO"} [ "$REPO" == "$(ogGetRepoIp)" ] && REPO="REPO" @@ -73,25 +65,17 @@ then [ $RETVAL -gt 0 ] && exit $RETVAL fi - - -if [ -f createImage$ogengine ]; then - createImage$ogengine "$1" "$2" "$REPO" /"$3" &>> $OGLOGCOMMAND +# Si existe, ejecuta script personalizado "createImageCustom"; si no, llama al genérico "createImage". +if which createImageCustom &>/dev/null; then + createImageCustom "$1" "$2" "$REPO" /"$3" &>> $OGLOGCOMMAND else createImage "$1" "$2" "$REPO" /"$3" &>> $OGLOGCOMMAND fi RETVAL=$? +# Cambiar acceso a modo usuario, si es necesario. [ "$REPO" == "REPO" -a "$boot" != "admin" ] && CambiarAcceso user -#if [ $RETVAL == 0 ] -#then -#rm $OGLOGFILE -# touch $OGLOGFILE -#else -# echo $RETVAL &>> $OGLOGFILE -#fi - # Registro de fin de ejecución ogEcho log session "$MSG_INTERFACE_END $RETVAL" -- cgit v1.2.3-18-g5258