There is restriction on kdump_pre and kdump_post directives now that can be specified only once in /etc/kdump.conf. However, there are multiple components that need to use the directives.
This patch implements /etc/kdump/{pre.d,post.d} interface to set up multiple binary and script files.
For example, users put multiple binary and script files under /etc/kdump/pre.d directory as below:
# find /etc/kdump/pre.d /etc/kdump/pre.d/50-foo.sh /etc/kdump/pre.d/75-hoge.sh
Then, 50-foo.sh and 75-hoge.sh are executed in order before kdump dump process begins just like kdump_pre directive written in /etc/kdump.conf.
This is composed of the following three patches created based on commit 4b43ba063ddbcdccf95d761d2a3641f3006d814d.
Signed-off-by: Shinichi Onitsuka onitsuka.shinic@fujitsu.com
--- Changes since v1: [1]Change title. [2]Change behavior of non 0 Exit status that script/binary in kdump/pre.d was returned. [3]Stop using find/sort commands. [4]Add checking execution bit. [5]Add specification of /etc/kdump/{pre.d,post.d} interface
Changes since v2: [1]Correct sentence errors in kdump.conf. [2]Move the doc commit after the code change. [3]Change the name of the added function in dracut-module-setup.sh. [4]Change the commit comment of kdumpctl ---
Shin-ichi Onitsuka (4): dracut-module-setup.sh: Install files under /etc/kdump/{pre.d,post.d} into kdump initramfs kdumpctl: Check the update of the binary and script files in /etc/kdump/{pre.d,post.d} dracut-kdump.sh: Execute the binary and script files in /etc/kdump/{pre.d,post.d} kdump.conf: Specify /etc/kdump/{pre.d,post.d} interface
dracut-kdump.sh | 34 ++++++++++++++++++++++++++++++++++ dracut-module-setup.sh | 25 +++++++++++++++++++++++++ kdump.conf | 14 ++++++++++++-- kdumpctl | 16 +++++++++++++++- 4 files changed, 86 insertions(+), 3 deletions(-)