[systemd-commits] 2 commits - src/efi-boot-generator src/gpt-auto-generator

Lennart Poettering lennart at kemper.freedesktop.org
Sun Apr 12 11:01:55 PDT 2015


 src/efi-boot-generator/efi-boot-generator.c |    6 +++++-
 src/gpt-auto-generator/gpt-auto-generator.c |    9 +++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 3d8dcaf1dad40c1287daa0a8a5fdf1ab8841d056
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun Apr 12 20:01:07 2015 +0200

    efi-boot-generator: need need to proceed if /boot is already a mount point

diff --git a/src/efi-boot-generator/efi-boot-generator.c b/src/efi-boot-generator/efi-boot-generator.c
index 4842286..94d7332 100644
--- a/src/efi-boot-generator/efi-boot-generator.c
+++ b/src/efi-boot-generator/efi-boot-generator.c
@@ -69,9 +69,13 @@ int main(int argc, char *argv[]) {
         }
 
         r = path_is_mount_point("/boot", true);
+        if (r > 0) {
+                log_debug("/boot is already a mount point, exiting.");
+                return EXIT_SUCCESS;
+        }
         if (r == -ENOENT)
                 log_debug("/boot does not exist, continuing.");
-        else if (r <= 0 && dir_is_empty("/boot") <= 0) {
+        else if (dir_is_empty("/boot") <= 0) {
                 log_debug("/boot already populated, exiting.");
                 return EXIT_SUCCESS;
         }

commit eafe88e34a0698d2f4ebb747ab4911e35d0dfe4c
Author: Tobias Hunger <tobias.hunger at gmail.com>
Date:   Sat Apr 11 01:52:50 2015 +0200

    gpt-generator: Find device on a stateless system
    
    A stateless system has a tmpfs as root file system. That obviously
    does not have any block device associated with it. So try falling back
    to the device of the /usr filesystem if the root filesystem fails.

diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c
index 99dc50f..96a8447 100644
--- a/src/gpt-auto-generator/gpt-auto-generator.c
+++ b/src/gpt-auto-generator/gpt-auto-generator.c
@@ -658,8 +658,13 @@ static int add_mounts(void) {
         if (r < 0)
                 return log_error_errno(r, "Failed to determine block device of root file system: %m");
         else if (r == 0) {
-                log_debug("Root file system not on a (single) block device.");
-                return 0;
+                r = get_block_device("/usr", &devno);
+                if (r < 0)
+                        return log_error_errno(r, "Failed to determine block device of /usr file system: %m");
+                else if (r == 0) {
+                        log_debug("Neither root nor /usr file system are on a (single) block device.");
+                        return 0;
+                }
         }
 
         return enumerate_partitions(devno);



More information about the systemd-commits mailing list