From 8bef2d943b18768ab02c2b97b4399f7588f482a5 Mon Sep 17 00:00:00 2001 From: Pingfan Liu Date: Thu, 16 Jul 2020 16:50:13 +0800 Subject: [PATCH] kexec-tools.spec: make the existence of pre.d and post.d mandatory 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 during rpm installation. Signed-off-by: Pingfan Liu Acked-by: Kairui Song --- kexec-tools.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kexec-tools.spec b/kexec-tools.spec index 4cd64c8..0fd4853 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -157,6 +157,9 @@ make -C makedumpfile-%{mkdf_ver} LDFLAGS="$LDFLAGS -I../eppic-%{eppic_ver}/libep %install mkdir -p -m755 $RPM_BUILD_ROOT/usr/sbin mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig +mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/kdump +mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/kdump/pre.d +mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/kdump/post.d mkdir -p -m755 $RPM_BUILD_ROOT%{_localstatedir}/crash mkdir -p -m755 $RPM_BUILD_ROOT%{_mandir}/man8/ mkdir -p -m755 $RPM_BUILD_ROOT%{_mandir}/man5/ @@ -327,6 +330,9 @@ done %endif %{dracutlibdir}/modules.d/* %dir %{_localstatedir}/crash +%dir %{_sysconfdir}/kdump +%dir %{_sysconfdir}/kdump/pre.d +%dir %{_sysconfdir}/kdump/post.d %{_mandir}/man8/kdumpctl.8.gz %{_mandir}/man8/kexec.8.gz %ifarch %{ix86} x86_64 ppc64 s390x ppc64le aarch64