X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fgpt-auto-generator%2Fgpt-auto-generator.c;h=81d692c51368c034ff14ad51932c1fbfcffbbd4b;hb=ee530d8b73246f29781bd54a707ca75c7ef5a6cb;hp=0c7635bfe40e753646e4ddcff44a75a77a54d7cf;hpb=1a14a53cfded6e78c6e8dfb73fdff0039971d642;p=elogind.git diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index 0c7635bfe..81d692c51 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 * */ @@ -174,7 +175,7 @@ static int add_swap(const char *path, const char *fstype) { "DefaultDependencies=no\n" "Conflicts=" SPECIAL_UMOUNT_TARGET "\n" "Before=" SPECIAL_UMOUNT_TARGET " " SPECIAL_SWAP_TARGET "\n\n" - "[Mount]\n" + "[Swap]\n" "What=%s\n", path); @@ -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");