]> git.pld-linux.org Git - packages/nagios-plugin-check_raid.git/blob - nagios-plugin-check_raid.spec
- keep default status OK; rel 4
[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:        4
6 License:        GPL v2
7 Group:          Networking
8 Source0:        %{plugin}
9 URL:            http://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/RAID-Controllers/check_raid/details
10 Source1:        %{plugin}.cfg
11 Requires:       nagios-core
12 Requires:       sudo
13 Suggests:       CmdTool2
14 Suggests:       arcconf
15 Suggests:       cciss_vol_status
16 Suggests:       megarc-scsi
17 Suggests:       mpt-status
18 Suggests:       tw_cli-9xxx
19 BuildArch:      noarch
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %define         _sysconfdir     /etc/nagios/plugins
23 %define         plugindir       %{_prefix}/lib/nagios/plugins
24
25 %description
26 This plugin chekcs Check all RAID volumes (hardware and software) that
27 can be identified.
28
29 Supports:
30 - Linux, Solaris and AIX software RAID
31 - Linux MegaIDE/IPS/Serveraid/MPT/LSI/GDTH/I2O hardware RAID controllers.
32 - 3ware SATA RAID
33 - Adaptec AAC RAID
34 - LSI MegaRaid
35 - HP/Compaq Smarty Array
36
37 %prep
38 %setup -qcT
39 cp -p %{SOURCE0} %{plugin}
40
41 %install
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{plugindir}}
44 install -p %{plugin} $RPM_BUILD_ROOT%{plugindir}/%{plugin}
45 sed -e 's,@plugindir@,%{plugindir},' %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
46
47 %clean
48 rm -rf $RPM_BUILD_ROOT
49
50 %post
51 if [ "$1" = 1 ]; then
52         # setup sudo rules on first install
53         %{plugindir}/%{plugin} -S || :
54 fi
55
56 %postun
57 if [ "$1" = 0 ]; then
58         # remove all sudo rules related to us
59         %{__sed} -i -e '/CHECK_RAID/d' /etc/sudoers
60 fi
61
62 %files
63 %defattr(644,root,root,755)
64 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
65 %attr(755,root,root) %{plugindir}/%{plugin}
This page took 0.056129 seconds and 3 git commands to generate.