mirror of
https://github.com/systemd/systemd
synced 2024-07-21 18:24:38 +00:00
sysctl: increase log severity on failed write
Increase the log severity in case of writing to a non existent sysctl parameter as this can either be caused by a misspelling or a kernel mis- configuration, e.g. in case YAMA does not get loaded due to a incomplete lsm= override: systemd-sysctl[354]: Couldn't write '1' to 'kernel/yama/ptrace_scope', ignoring: No such file or directory
This commit is contained in:
parent
b0367874d5
commit
1805fbcf06
|
@ -107,7 +107,7 @@ static int sysctl_write_or_warn(const char *key, const char *value, bool ignore_
|
||||||
if (ignore_failure || r == -EROFS || ERRNO_IS_PRIVILEGE(r))
|
if (ignore_failure || r == -EROFS || ERRNO_IS_PRIVILEGE(r))
|
||||||
log_debug_errno(r, "Couldn't write '%s' to '%s', ignoring: %m", value, key);
|
log_debug_errno(r, "Couldn't write '%s' to '%s', ignoring: %m", value, key);
|
||||||
else if (r == -ENOENT)
|
else if (r == -ENOENT)
|
||||||
log_info_errno(r, "Couldn't write '%s' to '%s', ignoring: %m", value, key);
|
log_warning_errno(r, "Couldn't write '%s' to '%s', ignoring: %m", value, key);
|
||||||
else
|
else
|
||||||
return log_error_errno(r, "Couldn't write '%s' to '%s': %m", value, key);
|
return log_error_errno(r, "Couldn't write '%s' to '%s': %m", value, key);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue