genfstab: fix src of bind mounts
Sources of bind mounts in fstab should be relative to the target's root instead of the host one. And the check logic below ([[ $src -ef $target ]]
) only works in this way, too.
Let's take the bind mount method of mounting the ESP (described in ArchWiki) as an example. After running mount --bind /mnt/efi/EFI/arch /mnt/boot
in the installation medium, genfstab
would generate an entry like this:
/mnt/efi/EFI/arch /boot none sth,bind 0 0
which won't work after booting into the installed system.