On 06/05/2020 10:21 AM, onitsuka.shinic(a)fujitsu.com wrote:
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 four patches created based on
commit 8fcbb4d265f6f7948081ecd88cccbb1d6548c449.
Do you mean 8fcbb4d265f6
("fadump: update fadump-howto.txt with some
more troubleshooting help") ?
I tried to apply 1/4, but failed with
Applying: dracut-module-setup.sh: Install files under
/etc/kdump/{pre.d,post.d} into kdump initramfs
.git/rebase-apply/patch:13: trailing whitespace.
# install etc/kdump/pre.d and /etc/kdump/post.d
.git/rebase-apply/patch:14: trailing whitespace.
kdump_install_pre_post_conf() {
.git/rebase-apply/patch:15: trailing whitespace.
if [ -d /etc/kdump/pre.d ]; then
.git/rebase-apply/patch:16: trailing whitespace.
for file in /etc/kdump/pre.d/*; do
.git/rebase-apply/patch:17: trailing whitespace.
if [ -x "$file" ]; then
error: patch failed: dracut-module-setup.sh:427
error: dracut-module-setup.sh: patch does not apply
Patch failed at 0001 dracut-module-setup.sh: Install files under
/etc/kdump/{pre.d,post.d} into kdump initramfs
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
I think maintainer is also busy on other topic, not sure if he is
willing to resolve it by manual.
Except this issue, for the series's code part,
Acked-by: Pingfan Liu <piliu(a)redhat.com>
Signed-off-by: Shinichi Onitsuka <onitsuka.shinic(a)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
Changes since v3:
[1]Move the declaration of kdump_install_pre_post_conf before
declaration of default_dump_target_install_conf
in dracut-module-setup.sh.
[2]Change the commit comment of kdumpctl.
[3]Change the based on commit.
---
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(-)