diff -Naur bacula-7.0.1/examples/nagios/check_bacula/authenticate.c bacula-7.0.1.new/examples/nagios/check_bacula/authenticate.c --- bacula-7.0.1/examples/nagios/check_bacula/authenticate.c 2014-03-31 20:51:34.000000000 +0200 +++ bacula-7.0.1.new/examples/nagios/check_bacula/authenticate.c 2014-04-01 16:45:15.315588066 +0200 @@ -50,12 +50,14 @@ /* Response from Director */ static char DIROKhello[] = "1000 OK:"; -/* Commands sent to Storage daemon and File daemon and received - * from the User Agent */ -static char SDFDhello[] = "Hello Director %s calling\n"; +/* Commands sent to Storage daemon */ +static char SDhello[] = "Hello SD: Bacula Director %s calling\n"; + +/* Commands sent to File daemon */ +static char FDhello[] = "Hello Director %s calling\n"; /* Response from SD */ -static char SDOKhello[] = "3000 OK Hello\n"; +static char SDOKhello[] = "3000 OK Hello"; /* Response from FD */ static char FDOKhello[] = "2000 OK Hello"; @@ -114,7 +116,7 @@ bash_spaces(dirname); /* Timeout Hello after 5 mins */ btimer_t *tid = start_bsock_timer(sd, 60 * 5); - if (!sd->fsend(SDFDhello, dirname)) { + if (!sd->fsend(SDhello, dirname)) { stop_bsock_timer(tid); return 0; } @@ -130,7 +132,7 @@ } Dmsg1(110, "msg); stop_bsock_timer(tid); - if (strncmp(sd->msg, SDOKhello, sizeof(SDOKhello)) != 0) { + if (strncmp(sd->msg, SDOKhello, strlen(SDOKhello)) != 0) { return 0; } return 1; @@ -153,7 +155,7 @@ bash_spaces(dirname); /* Timeout Hello after 5 mins */ btimer_t *tid = start_bsock_timer(fd, 60 * 5); - if (!fd->fsend(SDFDhello, dirname)) { + if (!fd->fsend(FDhello, dirname)) { stop_bsock_timer(tid); return 0; } diff -Naur bacula-7.0.1/examples/nagios/check_bacula/Makefile.in bacula-7.0.1.new/examples/nagios/check_bacula/Makefile.in --- bacula-7.0.1/examples/nagios/check_bacula/Makefile.in 2014-03-31 20:51:34.000000000 +0200 +++ bacula-7.0.1.new/examples/nagios/check_bacula/Makefile.in 2014-04-01 16:46:12.364115625 +0200 @@ -70,7 +70,7 @@ (cd $(srcdir); $(RMF) Makefile) install: all - $(INSTALL_PROGRAM) check_bacula $(DESTDIR)$(sbindir)/check_bacula + $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) check_bacula $(DESTDIR)$(sbindir)/check_bacula uninstall: (cd $(DESTDIR)$(sbindir); $(RMF) check_bacula) diff -Naur bacula-7.0.1/examples/nagios/check_bacula/makeit bacula-7.0.1.new/examples/nagios/check_bacula/makeit --- bacula-7.0.1/examples/nagios/check_bacula/makeit 2014-03-31 20:51:34.000000000 +0200 +++ bacula-7.0.1.new/examples/nagios/check_bacula/makeit 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -#!/bin/sh - -make LIBS="-lpthread -ldl -lssl -lcrypto -lz"