diff options
Diffstat (limited to 'client/engine/Net.lib')
-rwxr-xr-x | client/engine/Net.lib | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/client/engine/Net.lib b/client/engine/Net.lib index 4b3faad9..d8f272b1 100755 --- a/client/engine/Net.lib +++ b/client/engine/Net.lib @@ -19,7 +19,8 @@ #@author Irina Gomez, ETSII Universidad de Sevilla #@date 2015-06-16 #*/ -function ogChangeRepo { +function ogChangeRepo () +{ local SRCIMG NEWREPO REPO OGUNIT if [ "$*" == "help" ]; then @@ -36,6 +37,9 @@ if [ $# -lt 1 ]; then fi +# Opciones de montaje: lectura o escritura +mount |grep "ogimages.*rw," &>/dev/null && RW=",rw" || RW=",ro" + # Si REPO tomamos el repositorio y la unidad organizativa actual REPO=$(ogGetRepoIp) OGUNIT="$(df | awk -F " " '/ogimages/ {sub("//.*/ogimages","",$1); sub("/","",$1); print $1}')" @@ -52,9 +56,6 @@ umount $OGIMG [ "$2" == "" ] && SRCIMG="ogimages" || SRCIMG="ogimages/$2" eval $(grep "OPTIONS=" /scripts/ogfunctions) -# 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 |