2
0
mirror of git://github.com/lxc/lxc synced 2025-08-31 16:57:57 +00:00

lxc-download: Fix to work without mktemp

mktemp isn't always available in busybox.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
Stéphane Graber
2014-01-24 18:23:28 -05:00
parent 0996e18ad5
commit 843a58743e

View File

@@ -249,7 +249,13 @@ fi
# Trap all exit signals
trap cleanup EXIT HUP INT TERM
DOWNLOAD_TEMP=$(mktemp -d)
if ! type mktemp >/dev/null 2>&1; then
DOWNLOAD_TEMP=/tmp/lxc-download.$$
mkdir -p $DOWNLOAD_TEMP
else
DOWNLOAD_TEMP=$(mktemp -d)
fi
# Simply list images
if [ "$DOWNLOAD_LIST_IMAGES" = "true" ] || \