From 9c665ee7aadf655e2ebdf1d49c031f4a6962e738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 5 Sep 2026 16:19:21 +0200 Subject: [PATCH] units: allow disabling systemd-coredumpd.service The new unit is nice, but it might not be appropriate in all scenarios. It requires a new kernel, which might be known to not be available, and also changes sysctl kernel.core_pattern at runtime, which might not be desired. Replace static enablement by a normal [Install] section and add the unit to presets to enable it by default. The awkward instructions in the man page are simplified and adjusted. --- NEWS | 2 +- man/systemd-coredump.xml | 8 ++------ presets/90-systemd.preset | 1 + units/meson.build | 1 - units/systemd-coredumpd.service.in | 3 +++ 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index d77b40ee25..f6bbe2d745 100644 --- a/NEWS +++ b/NEWS @@ -368,7 +368,7 @@ CHANGES WITH 262 in spe: kernel.core_pattern. Older kernels continue to use the per-coredump systemd-coredump@.service path. Changes to coredump.conf require reloading systemd-coredumpd.service, and deployments that set a - custom kernel.core_pattern should mask or stop that service. + custom kernel.core_pattern should stop and disable that service. * The coredumpctl dump and debug commands now honor --json= and include the selected coredump's metadata in the requested JSON format. diff --git a/man/systemd-coredump.xml b/man/systemd-coredump.xml index 6e96a6953f..e0c4e79c9e 100644 --- a/man/systemd-coredump.xml +++ b/man/systemd-coredump.xml @@ -328,12 +328,8 @@ 50-coredump.conf alone does not override the default kernel.core_pattern on such systems, since 60-coredump.conf will still take effect. To set a custom kernel.core_pattern of your own on a system where - systemd-coredumpd.service is available, you must additionally stop (if currently - running) and mask systemd-coredumpd.service: - systemctl mask --now systemd-coredumpd.service - Masking systemd-coredumpd.service also prevents - systemd-coredump-register.service, which is bound to it, from running and writing - 60-coredump.conf. + systemd-coredumpd.service is active, stop and disable it: + systemctl disable --now systemd-coredumpd.service In order to be used in the mode, an appropriate backtrace handler must be installed on the sender side. For example, in case of diff --git a/presets/90-systemd.preset b/presets/90-systemd.preset index bf6006c35c..563f4d831f 100644 --- a/presets/90-systemd.preset +++ b/presets/90-systemd.preset @@ -22,6 +22,7 @@ enable getty@.service enable systemd-boot-clear-sysfail.service enable systemd-boot-update.service enable systemd-confext.service +enable systemd-coredumpd.service enable systemd-homed.service enable systemd-homed-activate.service enable systemd-journalctl-metrics.socket diff --git a/units/meson.build b/units/meson.build index 0d60b4e006..9f8f8d0e41 100644 --- a/units/meson.build +++ b/units/meson.build @@ -349,7 +349,6 @@ units = [ { 'file' : 'systemd-coredumpd.service.in', 'conditions' : ['ENABLE_COREDUMP'], - 'symlinks' : ['sysinit.target.wants/'], }, { 'file' : 'systemd-creds.socket', diff --git a/units/systemd-coredumpd.service.in b/units/systemd-coredumpd.service.in index 01eecb173a..eb8c7a68f6 100644 --- a/units/systemd-coredumpd.service.in +++ b/units/systemd-coredumpd.service.in @@ -57,3 +57,6 @@ SystemCallErrorNumber=EPERM SystemCallFilter=@system-service @mount TimeoutStopSec=6min {{SERVICE_WATCHDOG}} + +[Install] +WantedBy=sysinit.target