From dbe8214586cc685d19613bec970a75ee2f1087a0 Mon Sep 17 00:00:00 2001 From: Lianbo Jiang Date: Tue, 27 Feb 2018 19:35:47 +0800 Subject: [PATCH] kdumpctl: Check the modification time of core_collector When core_collector is changed, the kdump initramfs needs to be rebuilt before it is loaded. Signed-off-by: Lianbo Jiang Acked-by: Dave Young --- kdumpctl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kdumpctl b/kdumpctl index 4280e7e..cebca36 100755 --- a/kdumpctl +++ b/kdumpctl @@ -400,10 +400,12 @@ check_files_modified() EXTRA_BINS=`grep ^kdump_post $KDUMP_CONFIG_FILE | cut -d\ -f2` CHECK_FILES=`grep ^kdump_pre $KDUMP_CONFIG_FILE | cut -d\ -f2` + CORE_COLLECTOR=`grep ^core_collector $KDUMP_CONFIG_FILE | cut -d\ -f2` + CORE_COLLECTOR=`type -P $CORE_COLLECTOR` EXTRA_BINS="$EXTRA_BINS $CHECK_FILES" CHECK_FILES=`grep ^extra_bins $KDUMP_CONFIG_FILE | cut -d\ -f2-` EXTRA_BINS="$EXTRA_BINS $CHECK_FILES" - files="$KDUMP_CONFIG_FILE $kdump_kernel $EXTRA_BINS" + files="$KDUMP_CONFIG_FILE $kdump_kernel $EXTRA_BINS $CORE_COLLECTOR" [[ -e /etc/fstab ]] && files="$files /etc/fstab" check_exist "$files" && check_executable "$EXTRA_BINS"