Follow-up for
6a488fa7cce8124fa885adf8a2f31363fe62f636
Currently, if an fstab entry for /boot/ exists, we'll skip to try /efi/
instead. However, if it's already using the same device as the discovered
one, we should not duplicate the mount.
esp_path = "/boot";
id = "boot";
}
+ } else {
+ /* Check if the fstab entry for /boot/ is already the ESP. If so, we don't need to
+ * check /efi/ or duplicate the mount there. */
+ r = fstab_is_mount_point_full("/boot", p->node);
+ if (r < 0)
+ return log_error_errno(r,
+ "Failed to check if fstab entry for /boot uses the same device as '%s': %m",
+ p->node);
+ if (r > 0)
+ return 0;
}
}