From: Sven Hoexter Date: Sun, 16 Oct 2011 11:57:28 +0000 (+0200) Subject: Integrate mpt-status.init into the packaging. X-Git-Tag: 1.2.0-3~10 X-Git-Url: https://git.sven.stormbind.net/?a=commitdiff_plain;h=2a685ed2b155c3727d9635fd68ed78b0172a03c7;p=sven%2Fmpt-status.git Integrate mpt-status.init into the packaging. --- diff --git a/mpt-status.spec b/mpt-status.spec index 1666979..325d943 100644 --- a/mpt-status.spec +++ b/mpt-status.spec @@ -1,14 +1,19 @@ Summary: Get RAID status out of mpt (and other) HW RAID controllers Name: mpt-status Version: 1.2.0 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Applications/System URL: http://www.drugphish.ch/~ratz/mpt-status/ -Source:http://www.drugphish.ch/~ratz/mpt-status/%{name}-%{version}.tar.gz +Source: http://www.drugphish.ch/~ratz/mpt-status/%{name}-%{version}.tar.gz +Source10: mpt-status.init Patch1: mpt-status.header_path.patch Patch2: mpt-status.includes.patch BuildRequires: pciutils-devel +Requires: redhat-lsb, daemonize +Requires (preun): /sbin/chkconfig +Requires (preun): /sbin/service +Requires (post): /sbin/chkconfig BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -28,6 +33,7 @@ you to monitor the health and status of your RAID setup. %install %{__rm} -rf %{buildroot} %{__install} -D -m0755 mpt-status %{buildroot}%{_sbindir}/mpt-status +%{__install} -D -m0755 %{SOURCE10} %{buildroot}/%{_sysconfdir}/rc.d/init.d/mpt-status %clean %{__rm} -rf %{buildroot} @@ -37,7 +43,20 @@ you to monitor the health and status of your RAID setup. %doc doc/* %{_sbindir}/mpt-status +%post +/sbin/chkconfig --add mpt-status + +%preun +/sbin/service mpt-status stop > /dev/null 2>&1 +/sbin/chkconfig --del mpt-status + %changelog +* Sun Oct 16 2011 Sven Hoexter - 1.2.0-3 +- Add mpt-status.init as Source10 and install it into the package. +- Require redhat-lsb, daemonize and chkconfig/service for post/preun. +- post and preun snippets to add/remove mpt-status from the + chkconfig service list. + * Thu Sep 22 2011 Sven Hoexter - 1.2.0-2 - Start summary with a capital letter (rpmlint). - Change License to GPLv2+ (rpmlint).