-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy path70-kdump.rules.in
30 lines (25 loc) · 1.1 KB
/
70-kdump.rules.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@if @ARCH@ s390 s390x
#
# For s390x the ELF header is created in the kdump kernel and therefore
# no kdump udev rules are required.
#
@else
# Do nothing if kernel itself updates vmcoreinfo on hotplug
SUBSYSTEM=="cpu", ATTRS{crash_hotplug}=="1", GOTO="kdump_end"
SUBSYSTEM=="memory", ATTRS{crash_hotplug}=="1", GOTO="kdump_end"
# Kdump core headers needs to be regnerated if the CPUs or memory changes.
# For this, reload kdump.
SUBSYSTEM=="memory", ACTION=="add|remove", GOTO="kdump_try_restart"
@if @ARCH@ ppc ppc64 ppc64le
SUBSYSTEM=="cpu", ACTION=="online", GOTO="kdump_try_restart"
@endif
GOTO="kdump_end"
# Reload only if panic kernel is already loaded
LABEL="kdump_try_restart"
PROGRAM="/bin/cat /sys/kernel/kexec_crash_loaded", RESULT!="0", RUN+="/usr/lib/kdump/load-once.sh"
@if @ARCH@ ppc64 ppc64le
TEST=="/sys/kernel/fadump/hotplug_ready", PROGRAM="/bin/cat /sys/kernel/fadump/hotplug_ready", RESULT=="1", GOTO="kdump_end"
SUBSYSTEM=="memory", TEST=="/sys/kernel/fadump/registered", PROGRAM="/bin/cat /sys/kernel/fadump/registered", RESULT!="0", RUN+="/usr/lib/kdump/load-once.sh"
@endif
LABEL="kdump_end"
@endif