diff --git a/src/datastore_mad/remotes/libfs.sh b/src/datastore_mad/remotes/libfs.sh index 8537ebe796..cb5830a62f 100644 --- a/src/datastore_mad/remotes/libfs.sh +++ b/src/datastore_mad/remotes/libfs.sh @@ -309,7 +309,7 @@ function fs_size { # raw images requires special handling, as there is no image header # with size available and we can't predict image virtual size just # from a part of the file - if [ "${TYPE}" = 'raw' ] || "${TYPE}" = 'luks' ]; then + if [ "${TYPE}" = 'raw' ] || [ "${TYPE}" = 'luks' ]; then $UTILS_PATH/downloader.sh ${DOWNLOADER_ARGS} --nodecomp -c "${HEAD_SIZE}" "${SRC}" - >"${IMAGE}" 2>/dev/null error=$? if [ $error -ne 0 ]; then diff --git a/src/mad/sh/scripts_common.sh b/src/mad/sh/scripts_common.sh index 57e08dac8f..60507c8856 100644 --- a/src/mad/sh/scripts_common.sh +++ b/src/mad/sh/scripts_common.sh @@ -66,7 +66,7 @@ else fi # Used for log messages -SCRIPT_NAME=`basename $0` +SCRIPT_NAME=`basename -- $0` # ------------------------------------------------------------------------------ # Path manipulation functions