aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/GLIUtility.py')
-rw-r--r--src/GLIUtility.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/GLIUtility.py b/src/GLIUtility.py
index 1d2cf4f..0389e4b 100644
--- a/src/GLIUtility.py
+++ b/src/GLIUtility.py
@@ -299,6 +299,10 @@ def spawn(cmd, quiet=False, logfile=None, display_on_tty8=False, chroot=None, ap
debug = False
if chroot:
+ if not os.path.isdir(chroot + "/var"):
+ os.mkdir(chroot + "/var", mode=0755)
+ if not os.path.isdir(chroot + "/var/tmp"):
+ os.mkdir(chroot + "/var/tmp", mode=01777)
wrapper = open(chroot+"/var/tmp/spawn.sh", "w")
wrapper.write("#!/bin/bash -l\n" + cmd + "\nexit $?\n")
wrapper.close()