monitoring-plugins-rsync/monitoring-plugins-rsync-hidden_modules.patch
Lars Vogdt cabf39cf52 - renamed the package to monitoring-plugins-rsync
- added monitoring-plugins-rsync-hidden_modules.patch to allow hidden
  rsync modules to be tested
- use nagios-rpm-macros in specfile
- Fix license: it's GPL 2 or newer

- add a patch to use the timeouts present in rsync itself
  ( monitoring-plugins-rsync-timeout.patch ) 

- licenses package is no more and upstream wants GPLv3, so adding
  COPYING

- require licenses package (solves bnc #449756)

- update to 1.02:
  + Kill rsync process on ALRM timeouts 
    (Avoids leaving stale rsync processes behind) 
  + More verbose Rsync errors 
  + Commas in the password field should work 

- initial version 1.01

OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins-rsync?expand=0&rev=2
2014-07-30 10:16:37 +00:00

25 lines
808 B
Diff

--- check_rsync.orig 2012-07-02 17:18:01.194047612 +0200
+++ check_rsync 2012-07-02 17:18:11.378747279 +0200
@@ -120,19 +120,8 @@
my $realerr = $error_code >> 8;
report_error("Rsync command $command failed with error " . $realerr . ": " . (defined $RSYNCMSG{"$realerr"} ? $RSYNCMSG{"$realerr"} : "Unknown error")) if ($realerr != 0);
-# If one or more -m, check if these modules exists first...
-if (@modules) {
-
- my @result = split(/\n/, $result);
-
- foreach my $mod (@modules) {
- my $match = 0;
- for (@result) {
- $match = 1 if (/^$$mod[0]\s/);
- }
- report_error("Module $$mod[0] not found") if ($match == 0);
- }
-} else { # else just return OK
+# if we do not need to check modules, just return here
+if (! @modules){
print "OK: Rsync is up\n";
exit $ERRORS{'OK'};
}