diff options
author | irina <irinagomez@us.es> | 2015-12-09 13:47:13 +0000 |
---|---|---|
committer | irina <irinagomez@us.es> | 2015-12-09 13:47:13 +0000 |
commit | 79a417549b502d8383e1fa66702077d374df570e (patch) | |
tree | a1c307e08af9b6d7e98aaefa63c21a745673a5ac /admin/Interface | |
parent | cead9e314663cd4f877f17c3b868d2b67bfa3f80 (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-x | admin/Interface/CambiarAcceso | 6 | ||||
-rwxr-xr-x | admin/Interface/CrearImagen | 4 |
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 |