diff options
author | ramon <ramongomez@us.es> | 2014-12-17 11:10:07 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2014-12-17 11:10:07 +0000 |
commit | a6d2a27ac97df1cc6e40e9dbaba5c5f24ed8813c (patch) | |
tree | db1d2970e9c8dec6d119d6612a20a378809e83bf /admin/Interface | |
parent | 501e54326579b074740fb4f2fbaec2edef4c41f4 (diff) |
#651: Modificada interfaz {{{CrearImagen}}} para poder llamar a script personalizado de creación {{{createImageCustom}}}, si existe.
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4461 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/Interface')
-rwxr-xr-x | admin/Interface/CrearImagen | 24 |
1 files changed, 4 insertions, 20 deletions
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" |