summaryrefslogtreecommitdiffstats
path: root/admin/Interface
diff options
context:
space:
mode:
authoririna <irinagomez@us.es>2015-12-09 13:47:13 +0000
committeririna <irinagomez@us.es>2015-12-09 13:47:13 +0000
commit79a417549b502d8383e1fa66702077d374df570e (patch)
treea1c307e08af9b6d7e98aaefa63c21a745673a5ac /admin/Interface
parentcead9e314663cd4f877f17c3b868d2b67bfa3f80 (diff)
#678 Unidades organizativas: script e interfaz crear imagen permite directorios separados en el repositorio para distintas OU
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4754 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/Interface')
-rwxr-xr-xadmin/Interface/CambiarAcceso6
-rwxr-xr-xadmin/Interface/CrearImagen4
2 files changed, 7 insertions, 3 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