]> git.pld-linux.org Git - packages/nagios-plugin-check_raid.git/blobdiff - nagios-plugin-check_raid.spec
- version 2.1 with my excessive changes
[packages/nagios-plugin-check_raid.git] / nagios-plugin-check_raid.spec
index ce046b01e22d52e7bdfe0124fa08c3d8fcf9da10..69c12dbf2507f6d02cf5c2e5d5548802f52eacec 100644 (file)
@@ -1,15 +1,16 @@
 %define                plugin  check_raid
 Summary:       Nagios plugin to check current server's RAID status
 Name:          nagios-plugin-%{plugin}
-Version:       2.0
-Release:       0.1
+Version:       2.1
+Release:       0.5
 License:       Unknown
 Group:         Networking
 Source0:       %{plugin}
 # Source0-md5: 168cc7a68638ed2e07df81c4bd43603a
-URL:           http://www.monitoringexchange.org/cgi-bin/page.cgi?g=Detailed/1692.html;d=1
+URL:           http://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/RAID-Controllers/check_raid/details
 Source1:       %{plugin}.cfg
 Requires:      nagios-core
+Requires:      sudo
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -17,11 +18,12 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                plugindir       %{_prefix}/lib/nagios/plugins
 
 %description
-This plugin reports the current server's RAID status.
+This plugin chekcs Check all RAID volumes (hardware and software) that
+can be identified.
 
 Supports:
-- IPS; Solaris, AIX, Linux software RAID; megaide
-- megaraid, mpt (serveraid), aacli (serveraid)
+- Linux, Solaris and AIX software RAID
+- Linux MegaIDE/IPS/Serveraid/MPT/LSI hardware RAID controllers.
 
 %prep
 %setup -qcT
@@ -36,6 +38,18 @@ sed -e 's,@plugindir@,%{plugindir},' %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+if [ "$1" = 1 ]; then
+       # setup sudo rules on first install
+       %{plugindir}/%{plugin} -S || :
+fi
+
+%postun
+if [ "$1" = 0 ]; then
+       # remove all sudo rules related to us
+       %{__sed} -i -e '/CHECK_RAID/d' /etc/sudoers
+fi
+
 %files
 %defattr(644,root,root,755)
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{plugin}.cfg
This page took 0.045494 seconds and 4 git commands to generate.