diff options
author | Andrew Gaffney <agaffney@gentoo.org> | 2007-05-14 03:38:43 +0000 |
---|---|---|
committer | Andrew Gaffney <agaffney@gentoo.org> | 2007-05-14 03:38:43 +0000 |
commit | f9700d0036550a79be827c4a60bff8bddbfd97aa (patch) | |
tree | fc8493b95c8d9d7f37fe81eb5c882cdf18467684 | |
parent | add check for mounted partitions (diff) | |
download | gli-f9700d0036550a79be827c4a60bff8bddbfd97aa.tar.gz gli-f9700d0036550a79be827c4a60bff8bddbfd97aa.tar.bz2 gli-f9700d0036550a79be827c4a60bff8bddbfd97aa.zip |
create /var and /var/tmp in chroot if they don't exist
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/gli/trunk@1850 f8877401-5920-0410-a79b-8e2d7e04ca0d
-rw-r--r-- | src/GLIUtility.py | 4 |
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() |