From 587fdaa2a9220f7df15e021b97ba682655d87f1e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 30 Sep 2015 03:24:37 +0000 Subject: [PATCH] custom-chroot: run with --propagation=private when available --- .bin/custom-chroot | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.bin/custom-chroot b/.bin/custom-chroot index ebc5957..8b109d0 100755 --- a/.bin/custom-chroot +++ b/.bin/custom-chroot @@ -6,10 +6,12 @@ bootstrap() { if [[ -z ${UNSHARE} ]] ; then mount_args= if type -P unshare >&/dev/null ; then + test_arg() { unshare "$@" -- true >&/dev/null && uargs+=( "$@" ); } uargs=( -m ) - unshare -u -- true >&/dev/null && uargs+=( -u ) - unshare -i -- true >&/dev/null && uargs+=( -i ) - unshare -p -- true >&/dev/null && uargs+=( -p -f --mount-proc ) + test_arg -u + test_arg -i + test_arg -p -f --mount-proc + test_arg --propagation=private UNSHARE=true exec unshare "${uargs[@]}" -- "$0" "$@" fi else -- 2.39.5