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