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