From: Mike Frysinger Date: Tue, 13 May 2014 18:47:32 +0000 (-0400) Subject: chroot: support uts/pid namespaces too X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=be7880e1330a21f574925ae621119f305688552e;p=home.git chroot: support uts/pid namespaces too --- 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'