From b78dea2dc70a45cf503782b10810aad1a7333571 Mon Sep 17 00:00:00 2001 From: oddlama Date: Fri, 1 Jul 2022 19:54:26 +0200 Subject: [PATCH] fix: make all rbound mountpoints also rslaves. --- scripts/functions.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/functions.sh b/scripts/functions.sh index da0352c..62921cb 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -468,7 +468,7 @@ function format_zfs_standard() { || die "Could not create zfs pool on $devices_desc" if [[ "$compress" != false ]]; then - zfs set "compression=$compress" rpool/ROOT \ + zfs set "compression=$compress" rpool \ || die "Could enable compression on dataset 'rpool'" fi zfs create rpool/ROOT \ @@ -926,8 +926,12 @@ function gentoo_chroot() { einfo "Mounting virtual filesystems" ( mountpoint -q -- "$chroot_dir/proc" || mount -t proc /proc "$chroot_dir/proc" || exit 1 - mountpoint -q -- "$chroot_dir/run" || mount --rbind /run "$chroot_dir/run" || exit 1 - mountpoint -q -- "$chroot_dir/tmp" || mount --rbind /tmp "$chroot_dir/tmp" || exit 1 + mountpoint -q -- "$chroot_dir/run" || { + mount --rbind /run "$chroot_dir/run" && + mount --make-rslave "$chroot_dir/run"; } || exit 1 + mountpoint -q -- "$chroot_dir/tmp" || { + mount --rbind /tmp "$chroot_dir/tmp" && + mount --make-rslave "$chroot_dir/tmp"; } || exit 1 mountpoint -q -- "$chroot_dir/sys" || { mount --rbind /sys "$chroot_dir/sys" && mount --make-rslave "$chroot_dir/sys"; } || exit 1