diff options
author | ramon <ramongomez@us.es> | 2012-03-05 12:38:29 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2012-03-05 12:38:29 +0000 |
commit | 8106af9d2ce5936612826c8d76e7cb3b6227b946 (patch) | |
tree | 37202339453c8c8a3c5223c964eaa5faadcebc7a | |
parent | 3a72ee7b0677b0cbefdfaf3f27ac873b50cdf4a2 (diff) |
Versión 1.0.3, #511: Corregir errata en función {{{ogRestoreImage}}} al detectar tamaño de la partición destino.
git-svn-id: https://opengnsys.es/svn/trunk@2738 a21b9725-9963-47de-94b9-378ad31fedc9
-rwxr-xr-x | client/engine/Image.lib | 4 |
1 files changed, 3 insertions, 1 deletions
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 $? |