summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-01-05 16:11:15 +0100
committerLennart Poettering <lennart@poettering.net>2011-01-05 16:11:15 +0100
commit022707d96113accf6898b0a59be3a3acde2c6832 (patch)
tree7552c70fae8a79acb3099ab9c3a6ca810d42152a
parent5f7c426e2a7f72c473f98be9978d243db79d8910 (diff)
downloadsystemd-022707d96113accf6898b0a59be3a3acde2c6832.tar.gz
tmpfiles: nicer message when two or more conflicting lines are configured for the same file
-rw-r--r--src/tmpfiles.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tmpfiles.c b/src/tmpfiles.c
index 1234cbf348..984eaf0de1 100644
--- a/src/tmpfiles.c
+++ b/src/tmpfiles.c
@@ -591,6 +591,12 @@ static int parse_line(const char *fname, unsigned line, const char *buffer, cons
}
if ((r = hashmap_put(items, i->path, i)) < 0) {
+ if (r == -EEXIST) {
+ log_warning("Two or more conflicting lines for %s configured, ignoring.", i->path);
+ r = 0;
+ goto finish;
+ }
+
log_error("Failed to insert item %s: %s", i->path, strerror(-r));
goto finish;
}