diff options
-rwxr-xr-x | client/engine/Image.lib | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/client/engine/Image.lib b/client/engine/Image.lib index d45ece45..98d3d19b 100755 --- a/client/engine/Image.lib +++ b/client/engine/Image.lib @@ -131,7 +131,7 @@ if ! wget -qO "$1".full.sum "$ogrepo:9999/$2.full.sum"; then fi MD5FILE=$(cat "$1".full.sum) ogTiptorrentGet "$2" -MD5IMG=$(cat "$IMGPATH"*[0-3] | md5sum | cut -f1 -d " ") +MD5IMG=$(md5sum "$IMGPATH" | cut -f1 -d " ") if [ "$MD5IMG" != "$MD5FILE" ]; then ogRaiseError "$OG_ERR_NOTFOUND" "Error downloading $2, checksum mismatch" return $? @@ -158,7 +158,7 @@ return 0 function ogRestoreImageSyntax () { local TOOL COMPRESSOR LEVEL PART IMGFILE FILEHEAD INFOIMG IMGPATH IMGCACHEDIR -local MD5FILE MD5WGET IMGPATHPART1 +local MD5FILE MD5WGET # Si se solicita, mostrar ayuda. @@ -239,10 +239,9 @@ if [ "$#" -eq 4 ] || [ "$#" -eq 5 ]; then if ogFindCache &>/dev/null; then IMGCACHEDIR=$(ogGetMountPoint $(ogFindCache))/opt/opengnsys/images IMGPATH="$IMGCACHEDIR/$IMGFILE" - IMGPATHPART1="$IMGPATH.1" - if [ -f "$IMGPATHPART1" ]; then + if [ -f "$IMGPATH" ]; then if [ ! -f "$IMGPATH".full.sum ]; then - cat "$IMGPATH"*[0-3] | md5sum | cut -f1 -d " " > "$IMGPATH".full.sum + md5sum "$IMGPATH" | cut -f1 -d " " > "$IMGPATH".full.sum fi MD5FILE=$(cat "$IMGPATH".full.sum) MD5WGET=$(wget -qO - "$ogrepo:9999/$IMGFILE.full.sum") @@ -257,7 +256,7 @@ if [ "$#" -eq 4 ] || [ "$#" -eq 5 ]; then ogRaiseError "$OG_ERR_NOTFOUND" "Failed tiptorrent to cache $TOOL" return $? fi - CAT="cat $IMGPATH*[0-3] |" + CAT="cat $IMGPATH |" COMPRESSOR="$COMPRESSOR -" echo "$CAT $COMPRESSOR $MBUFFER $TOOL" else |