summaryrefslogtreecommitdiff
path: root/src/efi-boot-generator/efi-boot-generator.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-03-06 18:26:35 +0100
committerLennart Poettering <lennart@poettering.net>2014-03-06 18:48:22 +0100
commit6d26dfe11c853d612b84abe858520bbcb62c2e96 (patch)
treefa967f2db499fba6a084b1b2794510a49a4f6914 /src/efi-boot-generator/efi-boot-generator.c
parentc3834f9b881f2b1a68dc7d797c134f0b66b47b57 (diff)
generators: make automatic discovery generators work correctly when reloading
In addition to checking whether the diestination mount point is populated, check whether it is already a mount point. If it is already a mount point, or if it is unpopulated, let's create the unit.
Diffstat (limited to 'src/efi-boot-generator/efi-boot-generator.c')
-rw-r--r--src/efi-boot-generator/efi-boot-generator.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/efi-boot-generator/efi-boot-generator.c b/src/efi-boot-generator/efi-boot-generator.c
index cf9ff73b12..66d85bd204 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;
}