Resolves: bz 716994
-Added systemd unit file for kdump
This commit is contained in:
parent
bf110a7bbd
commit
bf1475e066
11
kdump.service
Normal file
11
kdump.service
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Crash recovery kernel arming
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/etc/init.d/kdump start
|
||||||
|
RemainAfterExit=yes
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: kexec-tools
|
Name: kexec-tools
|
||||||
Version: 2.0.2
|
Version: 2.0.2
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Summary: The kexec/kdump userspace component.
|
Summary: The kexec/kdump userspace component.
|
||||||
@ -20,6 +20,7 @@ Source12: mkdumprd.8
|
|||||||
Source13: kexec-tools-po.tar.gz
|
Source13: kexec-tools-po.tar.gz
|
||||||
Source14: 98-kexec.rules
|
Source14: 98-kexec.rules
|
||||||
Source15: kdump.conf.5
|
Source15: kdump.conf.5
|
||||||
|
Source16: kdump.service
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
# These are sources for mkdumprd2
|
# These are sources for mkdumprd2
|
||||||
@ -138,6 +139,7 @@ mkdir -p -m755 $RPM_BUILD_ROOT%{_mandir}/man5/
|
|||||||
mkdir -p -m755 $RPM_BUILD_ROOT%{_docdir}
|
mkdir -p -m755 $RPM_BUILD_ROOT%{_docdir}
|
||||||
mkdir -p -m755 $RPM_BUILD_ROOT%{_datadir}/kdump
|
mkdir -p -m755 $RPM_BUILD_ROOT%{_datadir}/kdump
|
||||||
mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
|
mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/
|
||||||
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/kdump
|
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/kdump
|
||||||
|
|
||||||
SYSCONFIG=$RPM_SOURCE_DIR/kdump.sysconfig.%{_target_cpu}
|
SYSCONFIG=$RPM_SOURCE_DIR/kdump.sysconfig.%{_target_cpu}
|
||||||
@ -152,6 +154,7 @@ install -m 755 %{SOURCE11} $RPM_BUILD_ROOT%{_datadir}/kdump/firstboot_kdump.py
|
|||||||
install -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_mandir}/man8/mkdumprd.8
|
install -m 644 %{SOURCE12} $RPM_BUILD_ROOT%{_mandir}/man8/mkdumprd.8
|
||||||
install -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/98-kexec.rules
|
install -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/98-kexec.rules
|
||||||
install -m 644 %{SOURCE15} $RPM_BUILD_ROOT%{_mandir}/man5/kdump.conf.5
|
install -m 644 %{SOURCE15} $RPM_BUILD_ROOT%{_mandir}/man5/kdump.conf.5
|
||||||
|
install -m 644 %{SOURCE16} $RPM_BUILD_ROOT/lib/systemd/system/kdump.service
|
||||||
|
|
||||||
%ifarch %{ix86} x86_64 ia64 ppc64
|
%ifarch %{ix86} x86_64 ia64 ppc64
|
||||||
install -m 755 makedumpfile-1.3.5/makedumpfile $RPM_BUILD_ROOT/sbin/makedumpfile
|
install -m 755 makedumpfile-1.3.5/makedumpfile $RPM_BUILD_ROOT/sbin/makedumpfile
|
||||||
@ -203,11 +206,13 @@ fi
|
|||||||
%postun
|
%postun
|
||||||
|
|
||||||
if [ "$1" -ge 1 ]; then
|
if [ "$1" -ge 1 ]; then
|
||||||
|
systemctl try-restart kdump.service &> /dev/null ||
|
||||||
/sbin/service kdump condrestart > /dev/null 2>&1 || :
|
/sbin/service kdump condrestart > /dev/null 2>&1 || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ "$1" = 0 ]; then
|
if [ "$1" = 0 ]; then
|
||||||
|
systemctl disable kdump.service &> /dev/null ||
|
||||||
/sbin/service kdump stop > /dev/null 2>&1 || :
|
/sbin/service kdump stop > /dev/null 2>&1 || :
|
||||||
/sbin/chkconfig --del kdump
|
/sbin/chkconfig --del kdump
|
||||||
fi
|
fi
|
||||||
@ -271,6 +276,7 @@ done
|
|||||||
%dir %{_localstatedir}/crash
|
%dir %{_localstatedir}/crash
|
||||||
%{_mandir}/man8/*
|
%{_mandir}/man8/*
|
||||||
%{_mandir}/man5/*
|
%{_mandir}/man5/*
|
||||||
|
/lib/systemd/system/*
|
||||||
%doc News
|
%doc News
|
||||||
%doc COPYING
|
%doc COPYING
|
||||||
%doc TODO
|
%doc TODO
|
||||||
@ -278,6 +284,9 @@ done
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 04 2011 Neil Horman <nhorman@redhat.com> - 2.0.2-2
|
||||||
|
- Added systemd unit file (bz 716994)
|
||||||
|
|
||||||
* Fri Jun 24 2011 Neil Horman <nhorman@redhat.com> - 2.0.2-1
|
* Fri Jun 24 2011 Neil Horman <nhorman@redhat.com> - 2.0.2-1
|
||||||
- Updated to upstream version 2.0.2
|
- Updated to upstream version 2.0.2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user