diff options
| author | CoprDistGit <infra@openeuler.org> | 2024-07-26 17:19:39 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2024-07-26 17:19:39 +0000 |
| commit | 5be00af7c80ed4972c1f3379e6db9937e1a8b7bd (patch) | |
| tree | 7938404f19676c304f68d0d47e475fe4a1440452 /98-kexec.rules | |
| parent | ad07ec0c7538028e4d732f63e34d58150f5ffd42 (diff) | |
automatic import of kexec-tools
Diffstat (limited to '98-kexec.rules')
| -rw-r--r-- | 98-kexec.rules | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/98-kexec.rules b/98-kexec.rules new file mode 100644 index 0000000..b73b701 --- /dev/null +++ b/98-kexec.rules @@ -0,0 +1,16 @@ +SUBSYSTEM=="cpu", ACTION=="add", GOTO="kdump_reload" +SUBSYSTEM=="cpu", ACTION=="remove", GOTO="kdump_reload" +SUBSYSTEM=="memory", ACTION=="online", GOTO="kdump_reload" +SUBSYSTEM=="memory", ACTION=="offline", GOTO="kdump_reload" + +GOTO="kdump_reload_end" + +LABEL="kdump_reload" + +# If kdump is not loaded, calling kdump-udev-throttle will end up +# doing nothing, but systemd-run will always generate extra logs for +# each call, so trigger the kdump-udev-throttler only if kdump +# service is active to avoid unnecessary logs +RUN+="/bin/sh -c '/usr/bin/systemctl is-active kdump.service || exit 0; /usr/bin/systemd-run --quiet --no-block /usr/lib/udev/kdump-udev-throttler'" + +LABEL="kdump_reload_end" |
