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