summaryrefslogtreecommitdiff
path: root/utils/sb2
diff options
context:
space:
mode:
Diffstat (limited to 'utils/sb2')
-rwxr-xr-xutils/sb28
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/sb2 b/utils/sb2
index f9057fb..24dfa13 100755
--- a/utils/sb2
+++ b/utils/sb2
@@ -536,6 +536,14 @@ do
done
shift $(($OPTIND - 1))
+if [ -n "$SBOX_SESSION_DIR" -a -f "$SBOX_SESSION_DIR/rules.lua" ]
+then
+ # already inside an sb2 session; ignore all options and just exec the command.
+ echo "WARNING: recursive calls to sb2 are not supported (session already exists)"
+ echo "WARNING: going to execute '$*' in this session"
+ exec $*
+fi
+
if [ "$SBOX_MAPPING_DEBUG" == "1" ]; then
# check that loglevel is valid
case $SBOX_MAPPING_LOGLEVEL in