mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03: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))
|
||||
log_debug_errno(r, "Couldn't write '%s' to '%s', ignoring: %m", value, key);
|
||||
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
|
||||
return log_error_errno(r, "Couldn't write '%s' to '%s': %m", value, key);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user