From f8b1b419798f31aaa4e319522734a974af423ad5 Mon Sep 17 00:00:00 2001 From: ramon Date: Mon, 5 Mar 2012 12:38:29 +0000 Subject: Versión 1.0.3, #511: Corregir errata en función {{{ogRestoreImage}}} al detectar tamaño de la partición destino. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://opengnsys.es/svn/branches/version1.0@2738 a21b9725-9963-47de-94b9-378ad31fedc9 --- client/engine/Image.lib | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'client/engine/Image.lib') diff --git a/client/engine/Image.lib b/client/engine/Image.lib index 0a0867f2..5ce8aa1c 100755 --- a/client/engine/Image.lib +++ b/client/engine/Image.lib @@ -506,7 +506,9 @@ IMGSIZE=$(ogGetImageSize "$1" "$2") || return $(ogRaiseError $OG_ERR_IMAGE " $1 #TODO: #Si la particion no esta formateado o tiene problemas formateamos ogMount $3 $4 || ogFormat $3 $4 -PARTSIZE=$(parted `ogDiskToDev $3 $4` unit kB print | awk '{y=x; x=$4};END{print y}' | tr -d kB) +#PARTSIZE=$(parted -sm $DISK unit kB print | \ +# awk -F: -v np=$4 '{if ($1==np) {gsub(/kB/,""); print $4} } ') +PARTSIZE=$(ogGetPartitionSize $3 $4) if [ $IMGSIZE -gt $PARTSIZE ]; then ogRaiseError $OG_ERR_IMGSIZEPARTITION " $PARTSIZE < $IMGSIZE" return $? -- cgit v1.2.3-18-g5258