summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b4463d1)
raw | patch | inline | side by side (parent: b4463d1)
author | Ian Kelling <ian@iankelling.org> | |
Sun, 5 Feb 2017 04:05:45 +0000 (20:05 -0800) | ||
committer | Ian Kelling <ian@iankelling.org> | |
Sun, 5 Feb 2017 04:05:45 +0000 (20:05 -0800) |
newns | patch | blob | history |
index 2896cf21d942162ccfe4d2472af2e962450ad937..76c7adf53c6aa4b623572eeb3cb07227f7cfbecb 100755 (executable)
--- a/newns
+++ b/newns
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 ####