chiark / gitweb /
conf-parser: never consider it an error if we cannot load a drop-in file because...
authorLennart Poettering <lennart@poettering.net>
Thu, 22 May 2014 07:47:46 +0000 (16:47 +0900)
committerLennart Poettering <lennart@poettering.net>
Thu, 22 May 2014 07:48:14 +0000 (16:48 +0900)
After all, we want to be able to boot with /etc empty one day...

src/shared/conf-parser.c

index 062b15b86a5b28443b281b563ca1b5491caabd61..77a172e9f1dffbdbd5ccf7a8802a49a3e2930c9d 100644 (file)
@@ -340,8 +340,8 @@ int config_parse(const char *unit,
         if (!f) {
                 f = ours = fopen(filename, "re");
                 if (!f) {
         if (!f) {
                 f = ours = fopen(filename, "re");
                 if (!f) {
-                        log_error("Failed to open configuration file '%s': %m", filename);
-                        return -errno;
+                        log_full(errno == ENOENT ? LOG_DEBUG : LOG_ERR, "Failed to open configuration file '%s': %m", filename);
+                        return errno == ENOENT ? 0 : -errno;
                 }
         }
 
                 }
         }