You are not logged in.
In /etc/sysctl.d/50-coredump.conf I have:
#kernel.core_pattern=|/bin/falseSo I can toggle coredumps by changing the comment. When I reboot with this config however, 'sysctl -n kernel.core_pattern' shows me '|/bin/false'.
If I completely remove the file I get the correct default from /usr/lib/sysctl.d/50-coredump.conf, which is '|/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %d %F %I'
'man sysctl.d' says "Empty lines and lines whose first non-whitespace character is "#" or ";" are ignored," so why am I getting '|/bin/false' when that line is commented out?
Last edited by jmj (2026-10-19 19:23:01)
Offline
I'm pretty sure it is set not by your /etc/sysctl.d/50-coredump.conf but by systemd from src/shared/coredump-util.c:182.
Offline
System file precedence
When using the --system option, sysctl will read files from directories in the following list in given order from top to bottom. Once a file of a given filename is loaded, any file of the same name in subsequent directories
is ignored./etc/sysctl.d/*.conf
/run/sysctl.d/*.conf
/usr/local/lib/sysctl.d/*.conf
/usr/lib/sysctl.d/*.conf
/lib/sysctl.d/*.conf
So you'll probably have to adjust your approach.
Offline
Wow ok that explains it. I guess my solution is to use /etc/sysctl.d/60-coredump.conf instead.
Offline