summaryrefslogtreecommitdiffstats
path: root/client/engine/Net.lib
diff options
context:
space:
mode:
Diffstat (limited to 'client/engine/Net.lib')
-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