This patch installs the binary and script files under /etc/kdump/{pre.d,post.d} into
new initramfs of kdump.
Signed-off-by: shin-onitsuka <onitsuka.shinic(a)fujitsu.com>
---
dracut-module-setup.sh | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index b186b38..414a184 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -530,6 +530,8 @@ kdump_install_conf() {
esac
done <<< "$(read_strip_comments /etc/kdump.conf)"
+ kdump_install_preafter_conf
+
default_dump_target_install_conf
kdump_configure_fence_kdump "${initdir}/tmp/$$-kdump.conf"
@@ -537,6 +539,24 @@ kdump_install_conf() {
rm -f ${initdir}/tmp/$$-kdump.conf
}
+# install etc/kdump/pre.d and /etc/kdump/post.d
+kdump_install_preafter_conf() {
+ if [ -d /etc/kdump/pre.d ]; then
+ for file in `find /etc/kdump/pre.d`; do
+ dracut_install $file
+ done
+ fi
+
+ if [ -d /etc/kdump/post.d ]; then
+ for file in `find /etc/kdump/post.d`; do
+ dracut_install $file
+ done
+ fi
+
+ dracut_install /usr/bin/find
+ dracut_install /usr/bin/sort
+}
+
# Default sysctl parameters should suffice for kdump kernel.
# Remove custom configurations sysctl.conf & sysctl.d/*
remove_sysctl_conf() {
--
1.8.3.1
Show replies by date