From 6f6f29fba520da02b8c5ae7ccce9de64fc455585 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Wed, 12 Jun 2013 13:30:58 +0200 Subject: [PATCH] installer.sh: make sure it doesn't bind-mount new system itself under $MOUNTPOINT/mnt/install --- installer/installer.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/installer/installer.sh b/installer/installer.sh index b7b73ad..f2351a4 100755 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -516,11 +516,11 @@ if [ "$INSTALL_BOOTLOADER_DEVICE" -o "$INSTALL_BOOTLOADER_DEVICE_EFI" ]; then mount -o bind /mnt $MOUNTPOINT/mnt mount -o bind /var/run/dbus $MOUNTPOINT/var/run/dbus for d in /mnt/*; do - [ -d $d ] && mount -o bind,ro $d ${MOUNTPOINT}${d} + [ -d $d -a "$d" != "${MOUNTPOINT}" ] && mount -o bind $d ${MOUNTPOINT}${d} done - chroot $MOUNTPOINT grub-mkconfig -o /boot/grub/grub.cfg + chroot $MOUNTPOINT update-grub for d in /mnt/*; do - [ -d $d ] && umount ${MOUNTPOINT}${d} + [ -d $d -a "$d" != "${MOUNTPOINT}" ] && umount ${MOUNTPOINT}${d} done umount $MOUNTPOINT/var/run/dbus umount $MOUNTPOINT/mnt