summaryrefslogtreecommitdiffstats
path: root/client/engine
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2012-03-05 12:38:29 +0000
committerramon <ramongomez@us.es>2012-03-05 12:38:29 +0000
commitf8b1b419798f31aaa4e319522734a974af423ad5 (patch)
tree63bc9b1fdb010cabc1575088ad0eeff194f87e0b /client/engine
parent415a9469cd1ac1f42ad9c4cd0e810a4f13f6204d (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/branches/version1.0@2738 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/engine')
-rwxr-xr-xclient/engine/Image.lib4
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 $?