mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
test: Fix unshare/nsenter not in PATH
Signed-off-by: Jacques de Laval <jacques@de-laval.se>
This commit is contained in:
@@ -13,8 +13,10 @@ shift
|
||||
TEST_DIR=$(dirname "$0")
|
||||
TESTS_ROOT="$(pwd)/${TEST_DIR}/test_root"
|
||||
|
||||
nsenter=$(which nsenter)
|
||||
|
||||
export PATH=/sbin:/bin
|
||||
nsenter \
|
||||
"$nsenter" \
|
||||
--preserve-credentials \
|
||||
--user \
|
||||
--mount \
|
||||
|
||||
@@ -7,10 +7,12 @@ TESTS_ROOT="$(pwd)/${TEST_DIR}/test_root"
|
||||
|
||||
>&2 echo "Hint: Execute '${TEST_DIR}/testenv_exec.sh \$(pgrep -P $$) /bin/sh; reset' to enter the test namespace"
|
||||
|
||||
unshare=$(which unshare)
|
||||
|
||||
# Not supported by Busybox unshare:
|
||||
# --cgroup --time
|
||||
export PATH=/sbin:/bin
|
||||
exec unshare \
|
||||
exec "$unshare" \
|
||||
--user --map-root-user \
|
||||
--fork --pid --mount-proc \
|
||||
--mount \
|
||||
|
||||
Reference in New Issue
Block a user