aboutsummaryrefslogtreecommitdiff
path: root/kvmx-create
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-06-13 21:33:01 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-06-13 21:33:01 -0300
commitca611af966192367d6adee375662987f5e754f84 (patch)
tree3ccf1ab1a3e16b5025459b9a375538984c554c4a /kvmx-create
parentac2562e2296fb2c94c509672cb28fc5180207808 (diff)
downloadkvmx-ca611af966192367d6adee375662987f5e754f84.tar.gz
kvmx-ca611af966192367d6adee375662987f5e754f84.tar.bz2
Use a TEMPLATE for mktemp at kvmx-create
Diffstat (limited to 'kvmx-create')
-rwxr-xr-xkvmx-create6
1 files changed, 5 insertions, 1 deletions
diff --git a/kvmx-create b/kvmx-create
index b7cb993..9d4b8c9 100755
--- a/kvmx-create
+++ b/kvmx-create
@@ -197,7 +197,11 @@ function kvmx_create_vmdebootstrap {
# Custom version
#
function kvmx_create_custom {
- WORK="`mktemp -d`"
+ if [ -z "$TMP" ]; then
+ TMP="/tmp"
+ fi
+
+ WORK="`mktemp -d $TMP/kvmx-create.XXXXXXXXXX`"
# Determine kernel architecture
if [ "$arch" == "i386" ]; then