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