mirror of
https://github.com/fsquillace/junest.git
synced 2026-07-27 12:53:53 +00:00
Issue #89: Remove the true executable
This commit is contained in:
parent
dc8018a4b9
commit
8425b09fce
1 changed files with 7 additions and 11 deletions
18
lib/core.sh
18
lib/core.sh
|
|
@ -82,7 +82,7 @@ ORIGIN_WD=$(pwd)
|
|||
|
||||
# List of executables that are run inside JuNest:
|
||||
SH=("/bin/sh" "--login")
|
||||
TRUE=true
|
||||
TRUE="true"
|
||||
ID="id -u"
|
||||
|
||||
# List of executables that are run in the host OS:
|
||||
|
|
@ -117,6 +117,11 @@ function mkdir_cmd(){
|
|||
mkdir $@ || $LD_EXEC ${JUNEST_HOME}/usr/bin/mkdir $@
|
||||
}
|
||||
|
||||
function proot_cmd(){
|
||||
${PROOT_COMPAT} "${@}" || PROOT_NO_SECCOMP=1 ${PROOT_COMPAT} "${@}" || \
|
||||
die "Error: Check if the ${CMD} arguments are correct or use the option ${CMD} -p \"-k 3.10\""
|
||||
}
|
||||
|
||||
function download_cmd(){
|
||||
$WGET $@ || $CURL $@
|
||||
}
|
||||
|
|
@ -214,16 +219,7 @@ function run_env_as_root(){
|
|||
function _run_proot(){
|
||||
local proot_args="$1"
|
||||
shift
|
||||
if ${PROOT_COMPAT} $proot_args ${TRUE} 1> /dev/null
|
||||
then
|
||||
JUNEST_ENV=1 ${PROOT_COMPAT} $proot_args "${@}"
|
||||
elif PROOT_NO_SECCOMP=1 ${PROOT_COMPAT} $proot_args ${TRUE} 1> /dev/null
|
||||
then
|
||||
warn "Proot error: Trying to execute proot with PROOT_NO_SECCOMP=1..."
|
||||
JUNEST_ENV=1 PROOT_NO_SECCOMP=1 ${PROOT_COMPAT} $proot_args "${@}"
|
||||
else
|
||||
die "Error: Check if the ${CMD} arguments are correct or use the option ${CMD} -p \"-k 3.10\""
|
||||
fi
|
||||
JUNEST_ENV=1 proot_cmd $proot_args "${@}"
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue