summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2011-04-05 15:08:32 +0000
committerramon <ramongomez@us.es>2011-04-05 15:08:32 +0000
commit52fa3da44e4d3990482c38a9c3a937f0aa0e83e3 (patch)
tree1d8c81fc30890f89185ebcee2f601f139e0ae88f /client
parent2af97381a271428e72ab95b9f52618bb7439d361 (diff)
Version 1.0: funciones {{{ogMountFs}}} y {{{ogUnmountFs}}} controlan si la partición está bloqueada.
Modificado #353. git-svn-id: https://opengnsys.es/svn/branches/version1.0@1704 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client')
-rwxr-xr-xclient/engine/FileSystem.lib20
1 files changed, 13 insertions, 7 deletions
diff --git a/client/engine/FileSystem.lib b/client/engine/FileSystem.lib
index 17391e19..1d6d76fb 100755
--- a/client/engine/FileSystem.lib
+++ b/client/engine/FileSystem.lib
@@ -543,7 +543,10 @@ MNTDIR="$(ogGetMountPoint $1 $2)"
# Si no, montarla en un directorio de sistema
if [ -z "$MNTDIR" ]; then
# Error si la particion esta bloqueada.
- ogIsLocked $1 $2 && ogRaiseError $OG_ERR_LOCKED "$1 $2" && return $?
+ if ogIsLocked $1 $2; then
+ ogRaiseError $OG_ERR_LOCKED "$MSG_PARTITION, $1 $2"
+ return $?
+ fi
# Crear punto de montaje o enlace símbolico para Caché local.
MNTDIR=${PART/dev/mnt}
TYPE="$(ogGetFsType $1 $2)" || return $?
@@ -823,15 +826,18 @@ MNTDIR="$(ogGetMountPoint $1 $2)"
# Si está montada, desmontarla.
if [ -n "$MNTDIR" ]; then
# Error si la particion está bloqueada.
- ogIsLocked $1 $2 && ogRaiseError $OG_ERR_LOCKED "$1 $2" && return $?
+ if ogIsLocked $1 $2; then
+ ogRaiseError $OG_ERR_LOCKED "$MSG_PARTITION $1, $2"
+ return $?
+ fi
# Desmontar y borrar punto de montaje.
- umount $PART 2>/dev/null || ogEcho warning "$FUNCNAME: $MSG_DONTUNMOUNT: \"$1,$2\""
+ umount $PART 2>/dev/null || ogEcho warning "$FUNCNAME: $MSG_DONTUNMOUNT: \"$1, $2\""
rmdir $MNTDIR 2>/dev/null || rm -f $MNTDIR 2>/dev/null
- # linea temporal durante desarrollo para testear nuevas herramientas con el cliente completo nfs
+ # linea temporal durante desarrollo para testear nuevas herramientas con el cliente completo nfs
if grep -q nfsroot /proc/cmdline; then
- cat /etc/mtab | grep -v $PART > /var/tmp/mtab.temporal && cp /var/tmp/mtab.temporal /var/tmp/mtab && rm /var/tmp/mtab.temporal
- fi
- # fin linea temporal.
+ grep -v $PART /etc/mtab > /var/tmp/mtab.temporal && cp /var/tmp/mtab.temporal /var/tmp/mtab && rm /var/tmp/mtab.temporal
+ fi
+ # fin linea temporal.
else
ogEcho warning "$MSG_DONTMOUNT: \"$1,$2\""
fi