X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fefi-boot-generator%2Fefi-boot-generator.c;h=d4d778036f3e07320d8a9e0facad994920118388;hp=cf9ff73b12d55c67ccd6f4fcf15f2cb834d1f3b6;hb=d2d66d1ce7da459ee2a01ac033197dbd053df9f8;hpb=c3834f9b881f2b1a68dc7d797c134f0b66b47b57 diff --git a/src/efi-boot-generator/efi-boot-generator.c b/src/efi-boot-generator/efi-boot-generator.c index cf9ff73b1..d4d778036 100644 --- a/src/efi-boot-generator/efi-boot-generator.c +++ b/src/efi-boot-generator/efi-boot-generator.c @@ -58,6 +58,7 @@ int main(int argc, char *argv[]) { log_debug("In initrd, exiting."); return EXIT_SUCCESS; } + if (detect_container(NULL) > 0) { log_debug("In a container, exiting."); return EXIT_SUCCESS; @@ -68,14 +69,15 @@ int main(int argc, char *argv[]) { return EXIT_SUCCESS; } - if (dir_is_empty("/boot") <= 0) { + if (path_is_mount_point("/boot", true) <= 0 && + dir_is_empty("/boot") <= 0) { log_debug("/boot already populated, exiting."); return EXIT_SUCCESS; } r = efi_loader_get_device_part_uuid(&id); if (r == -ENOENT) { - log_debug("EFI loader partition unknown exiting."); + log_debug("EFI loader partition unknown, exiting."); return EXIT_SUCCESS; } else if (r < 0) { log_error("Failed to read ESP partition UUID: %s", strerror(-r));