]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Use a TEMPLATE for mktemp at kvmx-create
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 14 Jun 2018 00:33:01 +0000 (21:33 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 14 Jun 2018 00:33:01 +0000 (21:33 -0300)
kvmx-create

index b7cb993be715d2efaa6ba8d112c092ed091a4bc9..9d4b8c9862c7e0a6fa0890c2614c86fabf0608b9 100755 (executable)
@@ -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