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