diff options
-rwxr-xr-x | admin/Interface/CambiarAcceso | 6 | ||||
-rwxr-xr-x | admin/Interface/CrearImagen | 4 | ||||
-rwxr-xr-x | client/shared/scripts/createImage | 7 |
3 files changed, 12 insertions, 5 deletions
diff --git a/admin/Interface/CambiarAcceso b/admin/Interface/CambiarAcceso index 50df9b49..75b38c9c 100755 --- a/admin/Interface/CambiarAcceso +++ b/admin/Interface/CambiarAcceso @@ -41,12 +41,14 @@ esac # Desmontar repositorio y volver a montarlo con el modo adecuado. umount $OGIMG +# Unidad organizativa +[ "$ogunit" != "" ] && OGUNIT="/$ogunit" ogEcho info "$PROG: Montar repositorio $REPO por $PROTO en modo $1" case "$PROTO" in - nfs) mount -t nfs $REPOIP:$OGIMG $OGIMG -o $MODE ;; + nfs) mount -t nfs $REPOIP:$OGIMG$OGUNIT $OGIMG -o $MODE ;; smb) PASS=$(grep "^[ ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 | \ sed 's/\(.*\)pass=\(\w*\)\(.*\)/\2/') PASS=${PASS:-"og"} - mount.cifs //$REPOIP/ogimages $OGIMG -o $MODE,serverino,acl,username=opengnsys,password=$PASS + mount.cifs //$REPOIP/ogimages$OGUNIT $OGIMG -o $MODE,serverino,acl,username=opengnsys,password=$PASS esac diff --git a/admin/Interface/CrearImagen b/admin/Interface/CrearImagen index d7d1edc3..de27856a 100755 --- a/admin/Interface/CrearImagen +++ b/admin/Interface/CrearImagen @@ -57,8 +57,10 @@ REPO=${4:-"REPO"} # Si es una ip y es distinta a la del recurso samba cambiamos de REPO. ogCheckIpAddress $REPO if [ $? == 0 -o $REPO == "REPO" ] ; then + # Unidad organizativa + [ "$ogunit" != "" ] && OGUNIT="$ogunit" # Si falla el cambio -> salimos con error repositorio no valido - ogChangeRepo $REPO || exit $(ogRaiseError $OG_ERR_NOTFOUND '$REPO'; echo $?) + ogChangeRepo $REPO $OGUNIT || exit $(ogRaiseError $OG_ERR_NOTFOUND '$REPO'; echo $?) REPO="REPO" fi diff --git a/client/shared/scripts/createImage b/client/shared/scripts/createImage index eabe5f11..4f41f55b 100755 --- a/client/shared/scripts/createImage +++ b/client/shared/scripts/createImage @@ -26,7 +26,7 @@ #@version 1.0.1 - Control de espacio requerido #@author Antonio J.Doblas Viso #@date 2011-05-10 - #@version 1.0.2 - Separacion de log +#@version 1.0.2 - Separacion de log #@author Antonio J.Doblas Viso #@date 2011-08-4 #*/ ## @@ -57,6 +57,9 @@ IMGEXT=${IMGEXT:-"img"} #IMGREDUCE="TRUE" REPO="${3^^}" +# Unidad organizativa +[ "$ogunit" != "" ] && OGUNIT="$ogunit" + # 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 @@ -69,7 +72,7 @@ ogEcho log session "[1] $MSG_SCRIPTS_START $0 $*" ogCheckIpAddress $REPO if [ $? == 0 -o $REPO == "REPO" ] ; then # Si falla el cambio -> salimos con error repositorio no valido - ogChangeRepo $REPO || exit $(ogRaiseError $OG_ERR_NOTFOUND '$REPO'; echo $?) + ogChangeRepo $REPO $OGUNIT || exit $(ogRaiseError $OG_ERR_NOTFOUND '$REPO'; echo $?) REPO="REPO" fi |