[Merge] ~rbalint/livecd-rootfs:make-rprivate-before-umount into livecd-rootfs:ubuntu/master

Balint Reczey balint.reczey at canonical.com
Tue Feb 5 09:05:03 UTC 2019



Diff comments:

> diff --git a/live-build/functions b/live-build/functions
> index 53f6c1a..a05db49 100644
> --- a/live-build/functions
> +++ b/live-build/functions
> @@ -112,6 +112,7 @@ teardown_mountpoint() {
>      # sort -r ensures that deeper mountpoints are unmounted first
>      for submount in $(awk </proc/self/mounts "\$2 ~ /$mountpoint_match/ \
>                        { print \$2 }" | LC_ALL=C sort -r); do
> +        mount --make-private $submount

If you mean doing it in setup_mountpoint(), then because (ignoring the name) setup_mountpoint did not assume that $mountpoint is a mount point thus is can still be called on a simple dir and also doing --make-private right before umount is more fail proof and lets propagation happen in the default way before umounts.

>          umount $submount
>      done
>      mv resolv.conf.tmp "$mountpoint/etc/resolv.conf"


-- 
https://code.launchpad.net/~rbalint/livecd-rootfs/+git/livecd-rootfs/+merge/362686
Your team Ubuntu Core Development Team is subscribed to branch livecd-rootfs:ubuntu/master.



More information about the Ubuntu-reviews mailing list