diff options
author | adv <adv@uma.es> | 2011-03-21 07:45:46 +0000 |
---|---|---|
committer | adv <adv@uma.es> | 2011-03-21 07:45:46 +0000 |
commit | 2d5f79c0dcc8b596b8e90ca7673a2de58fd34ca6 (patch) | |
tree | b4013dd7d7b9dd472d36c2cc4086208395ed8a1c /client/engine/Image.lib | |
parent | 526c95a72b014793fce7a36d5d22d0c347abe4bf (diff) |
ticket:342 ogGetImageInfo(), considera las distintas salidas de partclone.info
git-svn-id: https://opengnsys.es/svn/branches/version1.0@1586 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'client/engine/Image.lib')
-rwxr-xr-x | client/engine/Image.lib | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/engine/Image.lib b/client/engine/Image.lib index af1bb474..2949831c 100755 --- a/client/engine/Image.lib +++ b/client/engine/Image.lib @@ -588,7 +588,7 @@ fi #comprobando que el parametro uno es un file. [ -f $1 ] || ogRaiseError $OG_ERR_NOTFOUND "$1" || return $? -local TOOLS COMPRESSOR IMGFILE FILEHEAD FS SIZE PARTIMAGEINFO PARTCLONEINFO NTFSCLONEINFO IMGDETECT +local TOOLS COMPRESSOR IMGFILE FILEHEAD FS SIZE SIZEFACTOR PARTIMAGEINFO PARTCLONEINFO NTFSCLONEINFO IMGDETECT IMGDETECT="FALSE" IMGFILE=$1 @@ -605,7 +605,8 @@ then then TOOLS=PARTCLONE FS=$(echo $PARTCLONEINFO | awk '{gsub(/\: /,"\n"); print toupper($8);}') - SIZE=$(echo $PARTCLONEINFO | awk '{gsub(/\: /,"\n"); printf "%d\n", $11*1024*1024;}') + echo $PARTCLONEINFO | grep GB > /dev/null && SIZEFACTOR=1048576 || SIZEFACTOR=1024 + SIZE=$(echo $PARTCLONEINFO | awk -v FACTOR=$SIZEFACTOR '{gsub(/\: /,"\n"); printf "%d\n", $11*FACTOR;}') IMGDETECT="TRUE" fi fi |