]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
efi-boot-generator: Continue if /boot does not exist
authorTobias Hunger <tobias.hunger@gmail.com>
Sat, 11 Apr 2015 00:13:31 +0000 (02:13 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 12 Apr 2015 14:20:36 +0000 (10:20 -0400)
/boot does not exist on a stateless system, so do not get
confused by that.

src/efi-boot-generator/efi-boot-generator.c

index 58c4cc278a2da38d0a5af5e1b5bdc3f283ffc7ea..4842286e2e557f251f6f618de763a1de8b7e1d30 100644 (file)
@@ -68,8 +68,10 @@ int main(int argc, char *argv[]) {
                 return EXIT_SUCCESS;
         }
 
-        if (path_is_mount_point("/boot", true) <= 0 &&
-            dir_is_empty("/boot") <= 0) {
+        r = path_is_mount_point("/boot", true);
+        if (r == -ENOENT)
+                log_debug("/boot does not exist, continuing.");
+        else if (r <= 0 && dir_is_empty("/boot") <= 0) {
                 log_debug("/boot already populated, exiting.");
                 return EXIT_SUCCESS;
         }