templates: fix download template

This patch fixes commit 6e62213e ("templates: actually create DOWNLOAD_TEMP directory". To use mktemp -p correctly the directories need to exist. So call mkdir -p. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 1aeaca89
...@@ -319,8 +319,11 @@ fi ...@@ -319,8 +319,11 @@ fi
if ! command -V mktemp >/dev/null 2>&1; then if ! command -V mktemp >/dev/null 2>&1; then
DOWNLOAD_TEMP="${DOWNLOAD_TEMP}/tmp/lxc-download.$$" DOWNLOAD_TEMP="${DOWNLOAD_TEMP}/tmp/lxc-download.$$"
else elif [ -n "${DOWNLOAD_TEMP}" ]; then
mkdir -p "${DOWNLOAD_TEMP}"
DOWNLOAD_TEMP="$(mktemp -p ${DOWNLOAD_TEMP} -d)" DOWNLOAD_TEMP="$(mktemp -p ${DOWNLOAD_TEMP} -d)"
else
DOWNLOAD_TEMP="${DOWNLOAD_TEMP}$(mktemp -d)"
fi fi
# Simply list images # Simply list images
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment