From: Stéphane Graber Date: Fri, 24 Jan 2014 23:23:28 +0000 (-0500) Subject: lxc-download: Fix to work without mktemp X-Git-Tag: lxc-1.0.0.beta3~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=843a58743e6ba9e8efa61aede4cdf32be43af114;p=thirdparty%2Flxc.git lxc-download: Fix to work without mktemp mktemp isn't always available in busybox. Signed-off-by: Stéphane Graber --- diff --git a/templates/lxc-download.in b/templates/lxc-download.in index 66894ce2e..3b1d9f93f 100644 --- a/templates/lxc-download.in +++ b/templates/lxc-download.in @@ -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" ] || \