diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-03-06 18:26:35 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-03-06 18:48:22 +0100 |
commit | 6d26dfe11c853d612b84abe858520bbcb62c2e96 (patch) | |
tree | fa967f2db499fba6a084b1b2794510a49a4f6914 /src/gpt-auto-generator | |
parent | c3834f9b881f2b1a68dc7d797c134f0b66b47b57 (diff) |
generators: make automatic discovery generators work correctly when reloading
In addition to checking whether the diestination mount point is
populated, check whether it is already a mount point.
If it is already a mount point, or if it is unpopulated, let's create
the unit.
Diffstat (limited to 'src/gpt-auto-generator')
-rw-r--r-- | src/gpt-auto-generator/gpt-auto-generator.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index eb900b1263..3b7bc212d9 100644 --- a/src/gpt-auto-generator/gpt-auto-generator.c +++ b/src/gpt-auto-generator/gpt-auto-generator.c @@ -298,7 +298,8 @@ static int add_mount(const char *id, const char *what, const char *where, const assert(fstype); assert(description); - if (dir_is_empty(where) <= 0) { + if (path_is_mount_point(where, true) <= 0 && + dir_is_empty(where) <= 0) { log_debug("%s already populated, ignoring.", where); return 0; } |