summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-08-13 10:21:16 +0200
committerLennart Poettering <lennart@poettering.net>2013-08-13 10:21:16 +0200
commit4b1b14a6a6acb1640596d5e9542829d32989d385 (patch)
tree8af925d152692fff6fbf2063ea4d2a9938d240c4
parent1a14a53cfded6e78c6e8dfb73fdff0039971d642 (diff)
gpt-auto-generator: Skip /home mounting if /home is not empty
-rw-r--r--src/gpt-auto-generator/gpt-auto-generator.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c
index 0c7635bfe4..60fb19ee07 100644
--- a/src/gpt-auto-generator/gpt-auto-generator.c
+++ b/src/gpt-auto-generator/gpt-auto-generator.c
@@ -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");