]> git.pld-linux.org Git - packages/nagios-plugin-check_raid.git/blob - nagios-plugin-check_raid.spec
- release 8
[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:        8
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:       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 controllers.
33 - 3ware SATA RAID
34 - Adaptec AAC RAID
35 - LSI MegaRaid
36 - HP/Compaq Smart Array
37
38 %prep
39 %setup -qcT
40 cp -p %{SOURCE0} %{plugin}
41
42 %install
43 rm -rf $RPM_BUILD_ROOT
44 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{plugindir}}
45 install -p %{plugin} $RPM_BUILD_ROOT%{plugindir}/%{plugin}
46 sed -e 's,@plugindir@,%{plugindir},' %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{plugin}.cfg
47
48 %clean
49 rm -rf $RPM_BUILD_ROOT
50
51 %post
52 if [ "$1" = 1 ]; then
53         # setup sudo rules on first install
54         %{plugindir}/%{plugin} -S || :
55 fi
56
57 %postun
58 if [ "$1" = 0 ]; then
59         # remove all sudo rules related to us
60         %{__sed} -i -e '/CHECK_RAID/d' /etc/sudoers
61 fi
62
63 %files
64 %defattr(644,root,root,755)
65 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
66 %attr(755,root,root) %{plugindir}/%{plugin}
This page took 0.081978 seconds and 4 git commands to generate.