Am 28.04.2012 12:34, schrieb Michael Friedrich:
> try that diff against current r1.7
>
> diff --git a/base/nebmods.c b/base/nebmods.c
> index c69f97d..071ec1c 100644
> --- a/base/nebmods.c
> +++ b/base/nebmods.c
> @@ -184,8 +184,11 @@ int neb_load_module(nebmodule *mod) {
>                   return ERROR;
>
>           /* add a compatibility check for 1.7 change of idomod.o ->
> idomod.so */
> -       if (strstr(mod->filename, "idomod.o") != NULL)
> -               logit(NSLOG_RUNTIME_ERROR, FALSE, "Error: trying to load
> module '%s' which has been deprecated! Check Changelog and upgrade
> docs!\n", mod->filename);
> +       if (strstr(mod->filename, "idomod.o") != NULL) {
> +               logit(NSLOG_RUNTIME_ERROR, FALSE, "Error: trying to load
> module '%s' which has been moved to libdir/idomod.so in Icinga 1.7!\n",
> mod->filename);
> +               logit(NSLOG_RUNTIME_ERROR, FALSE, "Check Changelog and
> upgrade docs to update the broker module entry!\n");
> +               return ERROR;
> +       }
>
>           /**********
>              Using dlopen() is great, but a real danger as-is.  The
> problem with loaded modules is that if you overwrite the original file
> (e.g. using 'mv'),
It works for the idomod, but now we have problems with the log.

icinga.log before
[1335616521] idomod: IDOMOD 1.7.0 (05-15-2012) Copyright(c) 2005-2008 
Ethan Galstad, Copyright(c) 2009-2012 Icinga Development Team 
(https://www.icinga.org)
[1335616521] idomod: Successfully connected to data sink.  0 queued 
items to flush.
[1335616521] Event broker module '/opt/icinga/lib/idomod.so' initialized 
successfully.
[1335616521] idomod: IDOMOD 1.6.1 (12-02-2011) Copyright(c) 2005-2008 
Ethan Galstad, Copyright(c) 2009-2011 Icinga Development Team 
(https://www.icinga.org)
[1335616521] idomod: Successfully connected to data sink.  0 queued 
items to flush.
[1335616521] Event broker module '/opt/icinga/bin/idomod.o' initialized 
successfully.
[1335616521] Finished daemonizing... (New PID=16993)
[1335616524] Event loop started...

after:
[1335616991] Warning: log_external_commands_user variable ignored. This 
has been deprecated.
->thats really all!!, no more entries afterwards!!!

syslog has more
Apr 28 14:43:11 xxx icinga: idomod: IDOMOD 1.7.0 (05-15-2012) 
Copyright(c) 2005-2008 Ethan Galstad, Copyright(c) 2009-2012 Icinga 
Development Team (https://www.icinga.org)
Apr 28 14:43:11 xxx ido2db: Client connected, data available.
Apr 28 14:43:11 xxx icinga: idomod: Successfully connected to data 
sink.  0 queued items to flush.
Apr 28 14:43:11 xxx icinga: Event broker module 
'/opt/icinga/lib/idomod.so' initialized successfully.
Apr 28 14:43:11 xxx ido2db: Handling client connection...
Apr 28 14:43:11 xxx icinga: Error: trying to load module 
'/opt/icinga/bin/idomod.o' which has been moved to libdir/idomod.so in 
Icinga 1.7!
Apr 28 14:43:11 xxx icinga: Check Changelog and upgrade docs to update 
the broker module entry!
Apr 28 14:43:11 xxx icinga: Finished daemonizing... (New PID=18294)
Apr 28 14:43:11 xxx ido2db: Successfully connected to oracle database
Apr 28 14:43:12 xxx icinga: Event loop started...

In general i think we should add a version check instead of a filename 
check. The name is not the real problem. Maybe someone decided to rename 
the actual  version back to idomod.o, than it will raise the same error.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
icinga-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/icinga-devel

Reply via email to