Mount using --make-rslave to ensure safe unmounts for rbind mounts

ubuntu/artful
Balint Reczey 7 years ago
parent 6d5ab03a14
commit 45201111a6

@ -79,7 +79,7 @@ mount_image() {
setup_mountpoint() { setup_mountpoint() {
local mountpoint="$1" local mountpoint="$1"
mount --rbind /dev "$mountpoint/dev" mount --rbind --make-rslave /dev "$mountpoint/dev"
mount proc-live -t proc "$mountpoint/proc" mount proc-live -t proc "$mountpoint/proc"
mount sysfs-live -t sysfs "$mountpoint/sys" mount sysfs-live -t sysfs "$mountpoint/sys"
mount -t tmpfs none "$mountpoint/tmp" mount -t tmpfs none "$mountpoint/tmp"

Loading…
Cancel
Save