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