summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/efi-boot-generator/efi-boot-generator.c4
-rw-r--r--src/gpt-auto-generator/gpt-auto-generator.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/efi-boot-generator/efi-boot-generator.c b/src/efi-boot-generator/efi-boot-generator.c
index cf9ff73b1..66d85bd20 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,7 +69,8 @@ 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;
}
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c
index eb900b126..3b7bc212d 100644
--- a/src/gpt-auto-generator/gpt-auto-generator.c
+++ b/src/gpt-auto-generator/gpt-auto-generator.c
@@ -298,7 +298,8 @@ static int add_mount(const char *id, const char *what, const char *where, const
assert(fstype);
assert(description);
- if (dir_is_empty(where) <= 0) {
+ if (path_is_mount_point(where, true) <= 0 &&
+ dir_is_empty(where) <= 0) {
log_debug("%s already populated, ignoring.", where);
return 0;
}