summaryrefslogtreecommitdiff
path: root/lua_scripts
diff options
context:
space:
mode:
authorLauri Aarnio <Lauri.Aarnio@iki.fi>2008-10-27 12:44:53 +0200
committerLauri Leukkunen <lle@rahina.org>2008-11-02 18:59:55 +0200
commit91f1ee5cd17f011ea73a5cefe038881f09a9e5ea (patch)
tree55ad7951d5ded251b9fc4529956bc4d40f749b74 /lua_scripts
parent5c3432418c315c24f738e3146a079098047c7f0c (diff)
sb2 command: New option -O for setting mode-specific options (for debugging) - New option "-O options" can be used to set a string which is available to the mapping mode scripts; that can be used for debugging. - emulate mode now has option "use-global-tmp": If that is activated, /tmp won't be mapped (the default is to map it to the session-specific tmp directory) - This feature is currently needed for debugging, because there seems to be problems mapping some things with binaries that run under qemu.
Diffstat (limited to 'lua_scripts')
-rw-r--r--lua_scripts/pathmaps/emulate/00_default.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/lua_scripts/pathmaps/emulate/00_default.lua b/lua_scripts/pathmaps/emulate/00_default.lua
index a92d790..f0ae06f 100644
--- a/lua_scripts/pathmaps/emulate/00_default.lua
+++ b/lua_scripts/pathmaps/emulate/00_default.lua
@@ -17,6 +17,14 @@ else
unmapped_workdir = sbox_workdir
end
+-- use "==" to test options as long as there is only one possible option,
+-- string.match() is slow..
+if sbox_mode_specific_options == "use-global-tmp" then
+ tmp_dir_dest = "/tmp"
+else
+ tmp_dir_dest = session_dir .. "/tmp"
+end
+
-- disable the gcc toolchain tricks. gcc & friends will be available, if
-- those have been installed to target_root (but then they will probably run
-- under cpu transparency = very slowly..)
@@ -40,7 +48,7 @@ mapall_chain = {
--
{prefix = session_dir, use_orig_path = true},
- {prefix = "/tmp", map_to = session_dir},
+ {prefix = "/tmp", replace_by = tmp_dir_dest},
--
{prefix = "/dev", use_orig_path = true},