-----Original Message-----
From: piliu <piliu(a)redhat.com>
Sent: Monday, June 1, 2020 11:25 AM
To: Onitsuka, Shinichi/鬼束 伸一 <onitsuka.shinic(a)fujitsu.com>;
kexec(a)lists.fedoraproject.org
Subject: Re: [PATCH v3 1/4] dracut-module-setup.sh: Install files under
On 05/28/2020 08:18 AM, onitsuka.shinic(a)fujitsu.com wrote:
> This patch installs the binary and script files under /etc/kdump/{pre.d,post.d}
> into new initramfs of kdump.
>
> Signed-off-by: Shinichi Onitsuka <onitsuka.shinic(a)fujitsu.com>
> ---
> dracut-module-setup.sh | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
> index 7a2c7b4..cc9d009 100755
> --- a/dracut-module-setup.sh
> +++ b/dracut-module-setup.sh
> @@ -521,6 +521,8 @@ kdump_install_conf() {
> esac
> done <<< "$(read_strip_comments /etc/kdump.conf)"
>
> + kdump_install_pre_post_conf
Should the declaration come firstly?
Thank you for your advice.
I moved the declaration of kdump_install_pre_post_conf before
declaration of default_dump_target_install_conf by v4 patch.
> +
> default_dump_target_install_conf
>
> kdump_configure_fence_kdump "${initdir}/tmp/$$-kdump.conf"
> @@ -528,6 +530,29 @@ kdump_install_conf() {
> rm -f ${initdir}/tmp/$$-kdump.conf
> }
>
> +# install etc/kdump/pre.d and /etc/kdump/post.d
> +kdump_install_pre_post_conf() {
> + if [ -d /etc/kdump/pre.d ]; then
> + for file in /etc/kdump/pre.d/*; do
> + if [ -x "$file" ]; then
> + dracut_install $file
> + else
> + echo "$file is not executable"
> + fi
> + done
> + fi
> +
> + if [ -d /etc/kdump/post.d ]; then
> + for file in /etc/kdump/post.d/*; do
> + if [ -x "$file" ]; then
> + dracut_install $file
> + else
> + echo "$file is not executable"
> + fi
> + done
> + fi
> +}
> +
> # Remove user custom configurations sysctl.conf & sysctl.d/*
> # and apply some optimization for kdump
> overwrite_sysctl_conf() {
>
Best Regards,
Shinichi Onitsuka