From 951d9848ad24ad6e6fcfccbc48229361798e11df Mon Sep 17 00:00:00 2001 From: Lichen Liu Date: Thu, 27 Nov 2025 10:35:53 +0800 Subject: [PATCH] Add systemd service for servicelog_notify This introduces a new systemd service for servicelog_notify to ensure proper setup during the actual boot process (e.g., for bootc environments). This commit only provides the unit file and has no immediate operational impact. Downstream packaging must configure the appropriate systemd preset and post-install script to enable it. Unlike the previous method, which only executed during kdump-utils installation or upgrades, via a systemd service will run servicelog_notify on every system boot. Signed-off-by: Lichen Liu --- kdump-migrate-notify.service | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 kdump-migrate-notify.service diff --git a/kdump-migrate-notify.service b/kdump-migrate-notify.service new file mode 100644 index 00000000..d338b530 --- /dev/null +++ b/kdump-migrate-notify.service @@ -0,0 +1,14 @@ +[Unit] +Description=Register kdump migration notification +After=kdump.service +ConditionPathExists=/usr/lib/kdump/kdump-migrate-action.sh +ConditionPathExists=/usr/bin/servicelog_notify + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/servicelog_notify --add --command=/usr/lib/kdump/kdump-migrate-action.sh --match='refcode="#MIGRATE" and serviceable=0' --type=EVENT --method=pairs_stdin +ExecStop=/usr/bin/servicelog_notify --remove --command=/usr/lib/kdump/kdump-migrate-action.sh + +[Install] +WantedBy=multi-user.target