From bf8834d4f43e39c4212e1974cee4a76c1a8ba545 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Fri, 5 Oct 2018 13:09:29 +0200 Subject: unshare: allow to set a new root This patch instroduces two new parameters to set the new root and the new working directory in this new root. This allows to combine "unshare chroot" in one command, and doing like this the /proc filesystem is correctly mounted in the new root with "--mount-proc". The new parameters are -R, --root and -w, --wd. The names are the same as for nsenter, except for "-r" that is already used by "--map-root-user" and replaced by "-R". Signed-off-by: Laurent Vivier --- bash-completion/unshare | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bash-completion') diff --git a/bash-completion/unshare b/bash-completion/unshare index 3fda4a194..64aea6784 100644 --- a/bash-completion/unshare +++ b/bash-completion/unshare @@ -33,7 +33,9 @@ _unshare_module() --propagation --setgroups --help - --version" + --version + --root + --wd" COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) return 0 ;; -- cgit v1.2.3-55-g7522