base/checks: Stop being tricksy with orphan detection checks

The orphan detection logic might be doing it wrong with regards to
hosts (it looks correct, but that's no guarantee), but intentionally
fooling ourselves with a bug in one place to work around a bug in
another makes absolutely no sense what so ever.

This patch removes one such cover-up bug. If we get the bug with
orphaned host checks back (unlikely, as they're run by the worker
processes now), we can fix that properly instead of working around
it in such a hackish manner.

This fixes issue 270.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2243 5f96b256-904b-4d8d-8c98-d829582c6739
xod: Fix contact inheritance

According to the docs, contacts should only be inherited from host to
service if the service has no other contacts what so ever (and the
same goes for escalations), but the way the code worked was that it
handled contact_groups and contacts directives separately, meaning
services with only 'contacts' specified were still eligible for
inheriting 'contact_groups' from the host, leading to much confusion.

This patch fixes that, and thereby issue 314.

While we're at it, we re-organize the inheritance macros a bit and
make sure to use them for cross-object inheritance too.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2244 5f96b256-904b-4d8d-8c98-d829582c6739
Show the buildmachinery some love

The specfile now has support for the devel package and the init
script has sysconfig support with automagic ramdisk fiddling.

Patched-by: Daniel Wittenberg <dwittenberg2008@gmail.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2245 5f96b256-904b-4d8d-8c98-d829582c6739
Add NERD, the Nagios Event Radio Dispatcher

Yes, I came up with the acronym first and the name afterwards.

This is quite nifty though, as it provides external applications
with a way to obtain real-time data from Nagios without having
to resort to writing C-code or relying on other addons. There's
currently only two channels; hostchecks and servicechecks, and
only two commands; subscribe and unsubscribe, but since channels
can be added without any major fuzz that will most likely happen
whenever people need a new type of data.

It's also quite neat that eventbroker modules can create their
own channels and thereby set up "radio merlin", or whatever
takes ones fancy.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2246 5f96b256-904b-4d8d-8c98-d829582c6739
Make Nagios build properly on OpenBSD

OpenBSD apparently doesn't have ETIME, and dprintf() is available
only in posix 200809, which is much too recent to be widely
portable. We arrange it by removing the unused iobroker_print_set()
function and defininig ETIME to ETIMEDOUT if it's previously
undefined.

Patched-by: Armin Wolfermann <aw@osn.de>
Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2247 5f96b256-904b-4d8d-8c98-d829582c6739