]> git.pld-linux.org Git - packages/nagios-plugin-check_raid.git/blob - nagios-plugin-check_raid.spec
- version 2.1 with my excessive changes
[packages/nagios-plugin-check_raid.git] / nagios-plugin-check_raid.spec
1 %define         plugin  check_raid
2 Summary:        Nagios plugin to check current server's RAID status
3 Name:           nagios-plugin-%{plugin}
4 Version:        2.1
5 Release:        0.5
6 License:        Unknown
7 Group:          Networking
8 Source0:        %{plugin}
9 # Source0-md5:  168cc7a68638ed2e07df81c4bd43603a
10 URL:            http://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/RAID-Controllers/check_raid/details
11 Source1:        %{plugin}.cfg
12 Requires:       nagios-core
13 Requires:       sudo
14 BuildArch:      noarch
15 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17 %define         _sysconfdir     /etc/nagios/plugins
18 %define         plugindir       %{_prefix}/lib/nagios/plugins
19
20 %description
21 This plugin chekcs Check all RAID volumes (hardware and software) that
22 can be identified.
23
24 Supports:
25 - Linux, Solaris and AIX software RAID
26 - Linux MegaIDE/IPS/Serveraid/MPT/LSI hardware RAID controllers.
27
28 %prep
29 %setup -qcT
30 cp -p %{SOURCE0} %{plugin}
31
32 %install
33 rm -rf $RPM_BUILD_ROOT
34 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{plugindir}}
35 install -p %{plugin} $RPM_BUILD_ROOT%{plugindir}/%{plugin}
36 sed -e 's,@plugindir@,%{plugindir},' %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
37
38 %clean
39 rm -rf $RPM_BUILD_ROOT
40
41 %post
42 if [ "$1" = 1 ]; then
43         # setup sudo rules on first install
44         %{plugindir}/%{plugin} -S || :
45 fi
46
47 %postun
48 if [ "$1" = 0 ]; then
49         # remove all sudo rules related to us
50         %{__sed} -i -e '/CHECK_RAID/d' /etc/sudoers
51 fi
52
53 %files
54 %defattr(644,root,root,755)
55 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
56 %attr(755,root,root) %{plugindir}/%{plugin}
This page took 0.07103 seconds and 4 git commands to generate.