summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authoririna <irinagomez@us.es>2018-02-23 12:07:51 +0000
committeririna <irinagomez@us.es>2018-02-23 12:07:51 +0000
commit1928687c08676f134b37d035e486bd2848926cf9 (patch)
treec2e04fd8e5c21f5b00278ca50d24eaa5d5c8b67d /client
parent342b44d0863cf7132017bcc92293b2f96d84be9d (diff)
#678 Con directorios de OU separados se resuelve errata de r5447 por la que al crear imagen en modo usuario no permite montar el repo en modo escritura.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5610 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client')
-rwxr-xr-xclient/engine/Net.lib6
1 files changed, 4 insertions, 2 deletions
diff --git a/client/engine/Net.lib b/client/engine/Net.lib
index 17c932d2..4b3faad9 100755
--- a/client/engine/Net.lib
+++ b/client/engine/Net.lib
@@ -38,7 +38,7 @@ fi
# Si REPO tomamos el repositorio y la unidad organizativa actual
REPO=$(ogGetRepoIp)
-OGUNIT="$(df | awk -F " " '/oglog/ {sub("//.*/oglog","",$1); sub("/","",$1); print $1}')"
+OGUNIT="$(df | awk -F " " '/ogimages/ {sub("//.*/ogimages","",$1); sub("/","",$1); print $1}')"
# Parametros de entrada. Si $1 = "REPO" dejo el repositorio actual
[ "${1^^}" == "REPO" ] && NEWREPO="$REPO" || NEWREPO="${1}"
@@ -51,7 +51,9 @@ source /scripts/ogfunctions
umount $OGIMG
[ "$2" == "" ] && SRCIMG="ogimages" || SRCIMG="ogimages/$2"
eval $(grep "OPTIONS=" /scripts/ogfunctions)
-[ "$ogactiveadmin" == "true" ] && RW=",rw" || RW=",ro"
+
+# Opciones de montaje: lectura o escritura
+mount |grep "ogimages.*rw," &>/dev/null && RW=",rw" || RW=",ro"
ogEcho session log "$MSG_HELP_ogChangeRepo $NEWREPO ${2%/}"
ogConnect $NEWREPO $ogprotocol $SRCIMG $OGIMG $RW