summaryrefslogtreecommitdiffstats
path: root/bash-completion
diff options
context:
space:
mode:
authorLaurent Vivier2018-10-05 13:09:29 +0200
committerKarel Zak2018-11-12 11:52:14 +0100
commitbf8834d4f43e39c4212e1974cee4a76c1a8ba545 (patch)
tree995b4b8f0e00579251d37348a502142d97b2def0 /bash-completion
parentagetty: fix output of escaped characters (diff)
downloadkernel-qcow2-util-linux-bf8834d4f43e39c4212e1974cee4a76c1a8ba545.tar.gz
kernel-qcow2-util-linux-bf8834d4f43e39c4212e1974cee4a76c1a8ba545.tar.xz
kernel-qcow2-util-linux-bf8834d4f43e39c4212e1974cee4a76c1a8ba545.zip
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 <laurent@vivier.eu>
Diffstat (limited to 'bash-completion')
-rw-r--r--bash-completion/unshare4
1 files changed, 3 insertions, 1 deletions
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
;;