summaryrefslogtreecommitdiffstats
path: root/client/engine/Rsync.lib
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2015-05-28 11:00:51 +0000
committerramon <ramongomez@us.es>2015-05-28 11:00:51 +0000
commitdfcc55abd5e8d8794a46835be68651b72128fb64 (patch)
tree1eb41050aa46ce66c774ebaf454eb35c286a4bdd /client/engine/Rsync.lib
parent12603f81e2d7da233fb60fdc641283dbbae27ef9 (diff)
Versión 1.1: Integrar últimos cambios.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@4638 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/engine/Rsync.lib')
-rwxr-xr-xclient/engine/Rsync.lib16
1 files changed, 9 insertions, 7 deletions
diff --git a/client/engine/Rsync.lib b/client/engine/Rsync.lib
index 70f5bbcc..a2889dac 100755
--- a/client/engine/Rsync.lib
+++ b/client/engine/Rsync.lib
@@ -95,8 +95,9 @@ if [ "$1" == "CACHE" -o "$1" == "cache" ]; then
fi
fi
else
- echo " dd if=/dev/zero of=$IMGFILE bs=1024 count=$SIZEREQUIRED"
- dd if=/dev/zero of="$IMGFILE" bs=1024 count=$SIZEREQUIRED 2>&1 | tee -a $OGLOGCOMMAND
+ touch "$IMGFILE"
+ echo " truncate --size=>$SIZEREQUIRED k $IMGFILE"
+ truncate --size=">$SIZEREQUIRED"k "$IMGFILE" &> $OGLOGCOMMAND
#Formateamos imagen
losetup $LOOPDEVICE $IMGFILE
# FS de la imagen segun la configuracion y la version del kernel: < 3.7 ext4, si >= btrfs
@@ -135,8 +136,9 @@ function ogCreateInfoImage () {
#@param 3 Repositorio [ REPO | CACHE ] (opcional en las completas)
#@param 4 Nombre Imagen Basica (opcional en las completas)
#@param 5 Tipo imagen [ img | diff ]
+#@version 1.0.6 rsync opcion W (whole) para que sea más rápido
#*/
-local IMGTYPE IMGDIRAUX DIRMOUNT DESTRSYNC PASSWORD OPTRSYNC USERRSYNC ORIG FSTYPE PART DIREMPTY IMGLIST IMGINFO IMGACL KERNELVERSION
+local IMGTYPE IMGDIRAUX DIRMOUNT DESTRSYNC PASSWORD USERRSYNC ORIG FSTYPE PART DIREMPTY IMGLIST IMGINFO IMGACL KERNELVERSION
# Ayuda o menos de 5 parametros y la imagen no es basica
if [ "$*" == "help" -o $# -lt 5 -a "$3" != "img" ]; then
ogHelp "$FUNCNAME" : "$MSG_HELP_ogCreateInfoImage" \
@@ -200,15 +202,15 @@ echo "#$IMGFS:NO:$FSTYPE:$SIZEDATA" > $IMGINFO
if [ "$IMGTYPE" == "img" ]; then
# Imagen Basica
- echo " rsync -aHAXvn --delete $ORIG/ $DIREMPTY >> $IMGINFO"
- rsync -aHAXvn --delete $ORIG/ $DIREMPTY>> $IMGINFO
+ echo " rsync -aHAXWvn --delete $ORIG/ $DIREMPTY >> $IMGINFO"
+ rsync -aHAXWvn --delete $ORIG/ $DIREMPTY>> $IMGINFO
sed -i -e s/"^sent.*.bytes\/sec"//g -e s/^total.*.speedup.*.$//g -e s/"sending.*.list"//g $IMGINFO
sed -i '/^\.\//d' $IMGINFO
else
# Imagen Diferencial
- echo " rsync -aHAXvn$OPTRSYNC --delete $ORIG/ $DESTRSYNC a $IMGLIST"
- rsync -aHAXvn$OPTRSYNC $PASSWORD --delete "$ORIG/" "$DESTRSYNC" >> $IMGLIST
+ echo " rsync -aHAXWvn --delete $ORIG/ $DESTRSYNC a $IMGLIST"
+ rsync -aHAXWvn $PASSWORD --delete "$ORIG/" "$DESTRSYNC" >> $IMGLIST
sed -i -e s/"^sent.*.bytes\/sec"//g -e s/^total.*.speedup.*.$//g -e s/"sending.*.list"//g $IMGLIST
sed -i '/^\.\//d' $IMGLIST