db7d74
SUBSYSTEM=="cpu", ACTION=="add", GOTO="kdump_reload"
db7d74
SUBSYSTEM=="cpu", ACTION=="remove", GOTO="kdump_reload"
db7d74
SUBSYSTEM=="memory", ACTION=="online", GOTO="kdump_reload"
db7d74
SUBSYSTEM=="memory", ACTION=="offline", GOTO="kdump_reload"
db7d74
db7d74
GOTO="kdump_reload_end"
db7d74
db7d74
LABEL="kdump_reload"
db7d74
db7d74
# If kdump is not loaded, calling kdump-udev-throttle will end up
db7d74
# doing nothing, but systemd-run will always generate extra logs for
db7d74
# each call, so trigger the kdump-udev-throttler only if kdump
db7d74
# service is active to avoid unnecessary logs
db7d74
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'"
db7d74
db7d74
LABEL="kdump_reload_end"