commit:     c0e013c9770eca18ea6fc68c87709d6fc6b1dc41
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  7 22:56:13 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Apr  7 22:59:57 2020 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=c0e013c9

gen_determineargs.sh: determine_real_args(): Error out early when already 
running within a sandbox

We cannot spawn a sandbox when we are already running within a sandbox.
This commit will make genkernel error out early to tell user about
the problem.

Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 gen_determineargs.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/gen_determineargs.sh b/gen_determineargs.sh
index 6c5d01c..95ec402 100755
--- a/gen_determineargs.sh
+++ b/gen_determineargs.sh
@@ -1012,6 +1012,11 @@ determine_real_args() {
                SANDBOX_COMMAND=
                if isTrue "${SANDBOX}"
                then
+                       if [ ${SANDBOX_ON} -eq 1 ]
+                       then
+                               gen_die "SANDBOX_ON=1 detected -- You cannot 
use --sandbox when already running within a sandbox!"
+                       fi
+
                        SANDBOX_COMMAND="$(which sandbox 2>/dev/null)"
                        if [ -z "${SANDBOX_COMMAND}" ]
                        then

Reply via email to