X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=newns;h=76c7adf53c6aa4b623572eeb3cb07227f7cfbecb;hb=b9cf4000a50a83b7f757212030e18b00104ab01f;hp=6da77278eedc873e0f97babb4ad3367d5b24aff8;hpb=49df8bd697275ea5d331efc114440a0fde964935;p=newns diff --git a/newns b/newns index 6da7727..76c7adf 100755 --- a/newns +++ b/newns @@ -38,21 +38,20 @@ fi usage() { cat </dev/null; then existing=true @@ -185,7 +196,17 @@ start() { touch /root/mount_namespaces/$nn fi if ! mountpoint /root/mount_namespaces/$nn >/dev/null; then - unshare --mount=/root/mount_namespaces/$nn + # documentation on propagation is a bit weird because it + # confusingly talks about binds, namespaces, and mirrors (which + # seems to be just another name for bind), shared subtrees + # (which seems to a term for binds and namespaces), and does not + # properly specify whether the documentation applies to binds, + # namespaces, or both. Notably, propagation for binds is marked + # on the original mount point, and propagation for a mount + # namespace is marked on mounts within the namespace. Here, we + # specify that we want mount changes propagated to us, but not + # back. + unshare --propagation slave --mount=/root/mount_namespaces/$nn fi #### end mount namespace setup ####