chiark / gitweb /
gpt-auto-generator: Skip /home mounting if /home is not empty
authorLennart Poettering <lennart@poettering.net>
Tue, 13 Aug 2013 08:21:16 +0000 (10:21 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 13 Aug 2013 08:21:16 +0000 (10:21 +0200)
src/gpt-auto-generator/gpt-auto-generator.c

index 0c7635bfe40e753646e4ddcff44a75a77a54d7cf..60fb19ee07f4f2394a076a4f5b4aee352f3e86c9 100644 (file)
@@ -40,6 +40,7 @@
  *
  * - Properly handle cryptsetup partitions
  * - Define new partition type for encrypted swap
+ * - Make /home automount rather than mount
  *
  */
 
@@ -201,6 +202,9 @@ static int add_home(const char *path, const char *fstype) {
         _cleanup_free_ char *unit = NULL, *lnk = NULL;
         _cleanup_fclose_ FILE *f = NULL;
 
+        if (dir_is_empty("/home") <= 0)
+                return 0;
+
         log_debug("Adding home: %s %s", path, fstype);
 
         unit = strappend(arg_dest, "/home.mount");