diff options
author | Lauri Aarnio <Lauri.Aarnio@iki.fi> | 2008-10-08 17:42:31 +0300 |
---|---|---|
committer | Lauri Leukkunen <lle@rahina.org> | 2008-10-18 15:18:14 +0300 |
commit | 5044503fe4a18abc3907b7634ac7f35d8bbb5c22 (patch) | |
tree | 2522011da75482b358a79f0ba16182ea8c247549 /utils | |
parent | 84fec609a79f33e73cd9d6e521cb77c615eea1a6 (diff) |
Check if sb2 was called recursively from an existing sb2 session
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/sb2 | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 |