From baa59196ab218f7f29caa393babf1d8f86cb44a7 Mon Sep 17 00:00:00 2001 From: irina Date: Fri, 13 Dec 2013 13:53:50 +0000 Subject: #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 --- client/engine/Rsync.lib | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'client/engine/Rsync.lib') 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 #" -- cgit v1.2.3-18-g5258