1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

Fix downloader with no hash

This commit is contained in:
Ruben S. Montero 2012-06-22 13:41:40 +02:00
parent 98c8cc85f4
commit 61a964786e

View File

@ -61,10 +61,8 @@ function decompress
# Function called to hash a stream. First parameter is the algorithm name.
function hasher
{
algo=$1
if [ -n "$algo" ]; then
openssl dgst -$algo | awk '{print $NF}' > $HASH_FILE
if [ -n "$1" ]; then
openssl dgst -$1 | awk '{print $NF}' > $HASH_FILE
else
# Needs something consuming stdin or the pipe will break
cat >/dev/null