summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authoririna <irinagomez@us.es>2017-11-17 09:44:59 +0000
committeririna <irinagomez@us.es>2017-11-17 09:44:59 +0000
commit0d4cef2257df9ad5d863497d19b813eb4b32ecdb (patch)
treedf1a6a7d1e1e2d0912db44ba54e979f0acab614e /client
parentf2696594bf06cb117673e916bcc93a31cd038e97 (diff)
#770 Al crear imagen: Se aumenta el tamaño estimado de las sincronizadas. Se espera antes de chequear si ha ido bien.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5512 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client')
-rwxr-xr-xclient/engine/Image.lib3
-rwxr-xr-xclient/shared/scripts/createBaseImage1
-rwxr-xr-xclient/shared/scripts/createDiffImage1
3 files changed, 4 insertions, 1 deletions
diff --git a/client/engine/Image.lib b/client/engine/Image.lib
index e1f1f9cf..b24cd45f 100755
--- a/client/engine/Image.lib
+++ b/client/engine/Image.lib
@@ -502,6 +502,7 @@ if [ "$IMGTYPE" == "_DIFF_" ]; then
[ -r /tmp/ogimg.info ] || return $(ogRaiseError session $OG_ERR_NOTFOUND "/tmp/ogimg.info"; echo $?)
cd $MNTDIR
SIZEDATA=$(grep -v "\/$" /tmp/ogimg.info | tr '\n' '\0'| du -x -c --files0-from=- 2>/dev/null|tail -n1 |cut -f1)
+ cd /
else
SIZEDATA=$(df -k | grep $MNTDIR | awk '{print $3}')
fi
@@ -512,7 +513,7 @@ if [ "$IMGTYPE" == "_SYNC_" -o "$IMGTYPE" == "_DIFF_" ]; then
# Sistema de fichero de la imagen según kernel, menor que 3.7 EXT4. comparamos revision
KERNELVERSION=$(uname -r| awk '{printf("%d",$1);sub(/[0-9]*\./,"",$1);printf(".%02d",$1)}')
[ $KERNELVERSION \< 3.07 ] && IMGFS="EXT4" || IMGFS=${IMGFS:-"BTRFS"}
- FACTORSYNC=${FACTORSYNC:-"120"}
+ FACTORSYNC=${FACTORSYNC:-"130"}
# Si IMGFS="BTRFS" la compresion es mayor.
[ $IMGFS == "BTRFS" ] && let FACTORSYNC=$FACTORSYNC-20
diff --git a/client/shared/scripts/createBaseImage b/client/shared/scripts/createBaseImage
index 85b1930f..c367e930 100755
--- a/client/shared/scripts/createBaseImage
+++ b/client/shared/scripts/createBaseImage
@@ -136,6 +136,7 @@ ogReduceImage $3 "$4" $IMGEXT
ogWaitSyncImage "$3" "$4" $IMGEXT "reduced" $SIZEREQUIRED || exit $(ogRaiseError session $OG_ERR_DONTMOUNT_IMAGE "$3 $4 $IMGEXT: time_out."; echo $?)
echo " " > $OGLOGCOMMAND
+sleep 2
# Comprobamos que la imagen esta bien detectacdo que es un sistema de ficheros.
ogEcho log session "[95] $MSG_HELP_ogCheckSyncImage"
ogCheckSyncImage $3 "$4" "img" || exit $(ogRaiseError session $OG_ERR_IMAGE "$3 $4 img" ; echo $?)
diff --git a/client/shared/scripts/createDiffImage b/client/shared/scripts/createDiffImage
index d01423eb..d5f897be 100755
--- a/client/shared/scripts/createDiffImage
+++ b/client/shared/scripts/createDiffImage
@@ -170,6 +170,7 @@ ogWaitSyncImage "$3" "$5" $DIFFTYPE "reduced" $SIZEREQUIRED || exit $(ogRaiseErr
# TODO: necesaria funcion que espere a que se reduzca la imagen para continuar el script
echo " " > $OGLOGCOMMAND
+sleep 2
# Comprobamos que la imagen esta bien
ogEcho log session "[95] $MSG_HELP_ogCheckSyncImage"
ogCheckSyncImage $3 "$5" diff || exit $(ogRaiseError session $OG_ERR_IMAGE "$3 $5 diff"; echo $?)