mirror of
https://github.com/troglobit/finit.git
synced 2026-09-30 21:13:01 +07:00
WIP: Unshare/Chroot test wrapper script
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
TEST_DIR=$(dirname "$0")
|
||||
TESTS_ROOT="${TEST_DIR}/test_root"
|
||||
|
||||
cp "${TEST_DIR}/testwrapper.sh" "${TESTS_ROOT}/usr/local/bin/"
|
||||
|
||||
unshare \
|
||||
--user --map-root-user \
|
||||
--fork --pid --mount-proc \
|
||||
--mount \
|
||||
--mount-proc \
|
||||
chroot "$TESTS_ROOT" /usr/local/bin/testwrapper.sh "$@"
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
export PATH=/sbin:/bin
|
||||
|
||||
mount -t proc none /proc
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user