chroot-mnt: add --make-rslave to commands.

This commit is contained in:
Érico Rolim 2020-07-25 01:38:53 -03:00
parent 98a15fa859
commit 62077c2a16
1 changed files with 4 additions and 4 deletions

View File

@ -8,15 +8,15 @@ if ! [ -e "$ROOTDIR/chrooted" ]; then
# chroot has been launched already
# xchroot commands
mount --rbind /dev "$ROOTDIR/dev"
mount --rbind /proc "$ROOTDIR/proc"
mount --rbind /sys "$ROOTDIR/sys"
mount --rbind --make-rslave /dev "$ROOTDIR/dev"
mount --rbind --make-rslave /proc "$ROOTDIR/proc"
mount --rbind --make-rslave /sys "$ROOTDIR/sys"
touch "$ROOTDIR/etc/resolv.conf"
mount --bind /etc/resolv.conf "$ROOTDIR/etc/resolv.conf"
mount --bind /tmp "$ROOTDIR/tmp"
mount --bind /home "$ROOTDIR/home"
mount --rbind /run "$ROOTDIR/run"
mount --rbind --make-rslave /run "$ROOTDIR/run"
touch "$ROOTDIR/chrooted"
fi