summaryrefslogtreecommitdiffstats
path: root/client/engine/Rsync.lib
diff options
context:
space:
mode:
authoririna <irinagomez@us.es>2013-12-13 13:53:50 +0000
committeririna <irinagomez@us.es>2013-12-13 13:53:50 +0000
commitbaa59196ab218f7f29caa393babf1d8f86cb44a7 (patch)
treeb03d5d6957c266e2803596d130b9e1375ca8460b /client/engine/Rsync.lib
parentf9e03adb9ed848602ff805dd0d9dfc2a27ff59ec (diff)
#565 Cambio nombre ogGetMountDir a ogGetMountImageDir. restoreDiffImage restaura antes la completa
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4109 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/engine/Rsync.lib')
-rwxr-xr-xclient/engine/Rsync.lib20
1 files changed, 10 insertions, 10 deletions
diff --git a/client/engine/Rsync.lib b/client/engine/Rsync.lib
index 939361d7..d8a67bc6 100755
--- a/client/engine/Rsync.lib
+++ b/client/engine/Rsync.lib
@@ -38,7 +38,7 @@ if [ "$1" == "CACHE" -o "$1" == "cache" ]; then
ogMakeDir "$1" $(dirname "/$2") || return $(ogRaiseError $OG_ERR_NOTWRITE "$3 /$4"; echo $?)
IMGDIR=$(ogGetParentPath "$1" "/$2") || return $(ogRaiseError $OG_ERR_NOTWRITE "$3 /$4"; echo $?)
fi
- DIRMOUNT=/tmp/$(ogGetMountDir "$2" "$3")
+ DIRMOUNT=/tmp/$(ogGetMountImageDir "$2" "$3")
mkdir -p "$DIRMOUNT"
LOOPDEVICE=$(losetup -f)
# Si existe el fichero de la imagen se hace copia de seguridad, si no existe se crea.
@@ -140,7 +140,7 @@ else
IMGTYPE=$5
if [ "$IMGTYPE" == "diff" ]; then
# Imagen completa con la que comparo la particion.
- IMGDIRAUX=$(ogGetMountDir "$4" "img")
+ IMGDIRAUX=$(ogGetMountImageDir "$4" "img")
if [ "$3" == "CACHE" -o "$3" == "cache" ]; then
DIRMOUNT="/tmp/$IMGDIRAUX"
DESTRSYNC=$DIRMOUNT
@@ -344,7 +344,7 @@ if [ $# -lt 4 ]; then
fi
ORIG=$(ogMount $1 $2)
-DIRMOUNT=$(ogGetMountDir "$4" $5)
+DIRMOUNT=$(ogGetMountImageDir "$4" $5)
# Si la imagen es diferencial la lista de ficheros a transferir esta dentro de la imagen.
[ "$5" == "diff" ] && FILESFROM=" --files-from=/tmp/ogimg.info" || FILESFROM=""
@@ -393,7 +393,7 @@ if [ $# -lt 5 ]; then
fi
-DIRMOUNT=$(ogGetMountDir "$2" "$3")
+DIRMOUNT=$(ogGetMountImageDir "$2" "$3")
DESTRSYNC=$(ogGetMountPoint $4 $5)
# Borramos ficheros de informacion de restauraciones antiguas
@@ -469,7 +469,7 @@ fi
[ "$3" == "" -o "$3" == "img" ] && IMGEXT="img" || IMGEXT="img.diff"
-DIRMOUNT=$(ogGetMountDir "$2" ${IMGEXT#*\.})
+DIRMOUNT=$(ogGetMountImageDir "$2" ${IMGEXT#*\.})
if [ "$1" == "CACHE" -o "$1" == "cache" ]; then
# Si está montado nada que hacer.
@@ -528,7 +528,7 @@ fi
[ "$3" == "" ] && IMGTYPE="img" || IMGTYPE="$3"
if [ "$1" == "CACHE" -o "$1" == "cache" ]; then
- DIRMOUNT=/tmp/$(ogGetMountDir "$2" $IMGTYPE)
+ DIRMOUNT=/tmp/$(ogGetMountImageDir "$2" $IMGTYPE)
umount "$DIRMOUNT"
rmdir "$DIRMOUNT"
else
@@ -539,9 +539,9 @@ fi
}
-function ogGetMountDir () {
+function ogGetMountImageDir () {
#/**
-# ogGetMountDir
+# ogGetMountImageDir
#@brief Devuelve el directorio de montaje de la imagen.
#@param 1 Nombre Imagen
#@param 2 Tipo imagen [ img |diff ]
@@ -600,9 +600,9 @@ fi
SIZE=${4:-"300000"}
if [ "$1" == "CACHE" -o "$1" == "cache" ]; then
- DIRMOUNT="/tmp/$(ogGetMountDir "$2" $3)"
+ DIRMOUNT="/tmp/$(ogGetMountImageDir "$2" $3)"
else
- DIRMOUNT="$OGIMG/$(ogGetMountDir "$2" $3)"
+ DIRMOUNT="$OGIMG/$(ogGetMountImageDir "$2" $3)"
fi
echo -n -e " $MSG_SYNC_SLEEP: $DIRMOUNT\n #"