From cfb4513d5b4179d52ef86db4f4430578d983589d Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Sun, 6 Dec 2020 10:56:58 +0100 Subject: [PATCH] crash-recover: Allow local override The filesystem to be used for crash recover is rather system specific. So allow system specific logic by executing /etc/local/crash-recovery.sh if it exists. --- crashkernel/crash-recovery.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crashkernel/crash-recovery.sh b/crashkernel/crash-recovery.sh index 0114b17..092dbc7 100644 --- a/crashkernel/crash-recovery.sh +++ b/crashkernel/crash-recovery.sh @@ -55,6 +55,11 @@ core_size=$(stat -c %s /proc/vmcore) mount -o remount,rw / / +if test -x /etc/local/crash-recovery.sh; then + . /etc/local/crash-recovery.sh + reboot "/etc/local/crash-recovery.sh has finished" +fi + if mount -L CRASHDUMP /mnt; then test -e /mnt/crash.vmcore && rm /mnt/crash.vmcore if (( $(free_space /mnt) - $core_size > 1024*1024*1024 )); then