]> git.pld-linux.org Git - packages/nagios-plugin-check_raid.git/blobdiff - nagios-plugin-check_raid.spec
- typo
[packages/nagios-plugin-check_raid.git] / nagios-plugin-check_raid.spec
index 0f5b7ff0fbcb25251930531f0aa44bb1760eae53..7f64076a96beff9db856504c0b415ae50e9121ff 100644 (file)
@@ -1,17 +1,21 @@
-# TODO:
-# If you call 'check_raid -S' as root it will attempt to add the required lines to the sudoers file in order for itself to work.
 %define                plugin  check_raid
 Summary:       Nagios plugin to check current server's RAID status
 Name:          nagios-plugin-%{plugin}
-Version:       2.0
-Release:       0.2
-License:       Unknown
+Version:       2.1
+Release:       4
+License:       GPL v2
 Group:         Networking
 Source0:       %{plugin}
-# Source0-md5: 168cc7a68638ed2e07df81c4bd43603a
 URL:           http://exchange.nagios.org/directory/Plugins/Hardware/Storage-Systems/RAID-Controllers/check_raid/details
 Source1:       %{plugin}.cfg
 Requires:      nagios-core
+Requires:      sudo
+Suggests:      CmdTool2
+Suggests:      arcconf
+Suggests:      cciss_vol_status
+Suggests:      megarc-scsi
+Suggests:      mpt-status
+Suggests:      tw_cli-9xxx
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -24,7 +28,11 @@ can be identified.
 
 Supports:
 - Linux, Solaris and AIX software RAID
-- Linux MegaIDE/IPS/Serveraid/MPT/LSI hardware RAID controllers.
+- Linux MegaIDE/IPS/Serveraid/MPT/LSI/GDTH/I2O hardware RAID controllers.
+- 3ware SATA RAID
+- Adaptec AAC RAID
+- LSI MegaRaid
+- HP/Compaq Smart Array
 
 %prep
 %setup -qcT
@@ -39,6 +47,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.063853 seconds and 4 git commands to generate.