bedde7
SUBSYSTEM=="cpu", ACTION=="online", GOTO="kdump_reload"
bedde7
SUBSYSTEM=="memory", ACTION=="online", GOTO="kdump_reload"
bedde7
SUBSYSTEM=="memory", ACTION=="offline", GOTO="kdump_reload"
bedde7
bedde7
GOTO="kdump_reload_end"
bedde7
bedde7
LABEL="kdump_reload"
bedde7
bedde7
# If kdump is not loaded, calling "kdumpctl reload" will end up
bedde7
# doing nothing, but it and systemd-run will always generate
bedde7
# extra logs for each call, so trigger the "kdumpctl reload"
bedde7
# only if kdump service is active to avoid unnecessary logs
bedde7
RUN+="/bin/sh -c '/usr/bin/systemctl is-active kdump.service || exit 0; /usr/bin/systemd-run --quiet /usr/bin/kdumpctl reload'"
bedde7
bedde7
LABEL="kdump_reload_end"