From be7880e1330a21f574925ae621119f305688552e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 13 May 2014 14:47:32 -0400 Subject: [PATCH] chroot: support uts/pid namespaces too --- .bin/custom-chroot | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.bin/custom-chroot b/.bin/custom-chroot index 324405c..66613bc 100755 --- a/.bin/custom-chroot +++ b/.bin/custom-chroot @@ -6,7 +6,10 @@ bootstrap() { if [[ -z ${UNSHARE} ]] ; then mount_args= if type -P unshare >&/dev/null ; then - UNSHARE=true exec unshare -m -- "$0" "$@" + uargs=( -m ) + unshare -u -- true >&/dev/null && uargs+=( -u ) + unshare -p -- true >&/dev/null && uargs+=( -p -f --mount-proc ) + UNSHARE=true exec unshare "${uargs[@]}" -- "$0" "$@" fi else mount_args='-n' -- 2.39.5