Hi Pingfan,
See one comment inline.
On 06/30/20 at 11:05am, Pingfan Liu wrote:
If the directory /etc/kdump/pre.d is optional, then it is hard to
tell between the following cases:
-1. no directory "/etc/kdump/pre.d"
-2. "rm -rf /etc/kdump/pre.d", which removes all scripts under pre.d
For the second case, kdump.img should be rebuilt.
To bail out from this corner case, always creating pre.d and post.d.
Signed-off-by: Pingfan Liu <piliu(a)redhat.com>
---
kdumpctl | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kdumpctl b/kdumpctl
index 70fb551..5f1c956 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -345,6 +345,9 @@ check_files_modified()
POST_FILES="$POST_FILES $file"
fi
done
+ else
+ echo "creating /etc/kdump/post.d"
+ mkdir -p /etc/kdump/post.d
fi
if [ -d /etc/kdump/pre.d ]; then
for file in /etc/kdump/pre.d/*; do
@@ -352,6 +355,9 @@ check_files_modified()
PRE_FILES="$PRE_FILES $file"
fi
done
+ else
+ echo "creating /etc/kdump/pre.d"
+ mkdir -p /etc/kdump/pre.d
In this way, the dir created can not be tracked by rpm, that means after
uninstall kexec-tools, there will be something which are not cleaned
fi
CORE_COLLECTOR=`grep ^core_collector $KDUMP_CONFIG_FILE | cut -d\ -f2`
CORE_COLLECTOR=`type -P $CORE_COLLECTOR`
--
2.7.5
_______________________________________________
kexec mailing list -- kexec(a)lists.fedoraproject.org
To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org
Thanks
Dave