summaryrefslogtreecommitdiffstats
path: root/admin/Interface/CrearImagenBasica
diff options
context:
space:
mode:
Diffstat (limited to 'admin/Interface/CrearImagenBasica')
-rwxr-xr-xadmin/Interface/CrearImagenBasica16
1 files changed, 13 insertions, 3 deletions
diff --git a/admin/Interface/CrearImagenBasica b/admin/Interface/CrearImagenBasica
index f89ef401..8aaf5aa8 100755
--- a/admin/Interface/CrearImagenBasica
+++ b/admin/Interface/CrearImagenBasica
@@ -51,13 +51,21 @@
# Registro de inicio de ejecución
ogEcho log session "$MSG_INTERFACE_START $0 $*"
+ # Si el destino es REPO y el cliente no está en modo "admin"; activar repositorio para escritura,
+ PATH=$PATH:$(dirname $0)
+ CLIENTIP=$(ogGetIpAddress)
+ [ "$4" == "$CLIENTIP" ] && DEST=CACHE || DEST=REPO
+ if [ "$DEST" == "REPO" -a "$boot" != "admin" ]; then
+ CambiarAcceso admin &>> $OGLOGFILE
+ RETVAL=$?
+ [ $RETVAL -gt 0 ] && exit $RETVAL
+ fi
+
if [ $7 -eq 1 ]; then
#sincronizacion1
ogCrearImagenBasica "$@"
RETVAL=$?
fi
-
-
if [ $7 -eq 2 ]; then
# Sincronizacion2
@@ -72,13 +80,15 @@
[ $DELFILE -eq 1 ] && export ogrsyncdel=true || export ogrsyncdel=false
[ $COMPRESS -eq 1 ] && export ogrsyncz=true || export ogrsyncz=false
- [ "$4" == "0.0.0.0" ] && DEST="CACHE" || DEST="REPO"
+ # [ "$4" == "0.0.0.0" ] && DEST="CACHE" || DEST="REPO"
createBaseImage $1 $2 $DEST "$3"
RETVAL=$?
fi
+ # Si estamos en modo user montamos el repositorio en modo lectura.
+ [ "$DEST" == "REPO" -a "$boot" != "admin" ] && CambiarAcceso user
# Registro de fin de ejecución
ogEcho log session "$MSG_INTERFACE_END $RETVAL"