chiark / gitweb /
fragment: properly handle quotes in assignments in EnvironmentFile= files
[elogind.git] / src / sysctl.c
index c57210e28dbf281173d8801faf770a73c5c32b6b..38ea2d18bc2a48bcc85b17e17d547c58c7061bf0 100644 (file)
@@ -53,8 +53,12 @@ static void apply_sysctl(const char *property, const char *value) {
                         *n = '/';
 
         if ((r = write_one_line_file(p, value)) < 0) {
-                log_warning("Failed to write '%s' to '%s': %s", value, p, strerror(-r));
-                exit_code = r;
+
+                log_full(r == -ENOENT ? LOG_DEBUG : LOG_WARNING,
+                         "Failed to write '%s' to '%s': %s", value, p, strerror(-r));
+
+                if (r != -ENOENT)
+                        exit_code = r;
         }
 
         free(p);