config file reading bug

Jason Martin jhmartin at toger.us
Thu Mar 18 17:45:10 CET 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In 1.1 and 2.0, if a config file entry does not have a EOL character then 
the value for that config entry is not read.

Example: Move the illegal_macro_output_chars option to the very last line
of the nagios.cfg.  Set vim's binary and no-eol options (:set binary
noendofline) and write the file.

When preflighting, you will get a error / warning (1.1 and 2.0 
respectivly) that illegal_macro_output_chars has no value:
Warning: Nothing specified for illegal_macro_output_chars variable!

This is only really a problem when using a config tool (nawui for example)  
that doesn't write a \n after the last line of the config file. It is easy
to fix the config tool, however it would be nice if Nagios could handle
this as well.

This is in Nagios 1.1 and 2.0 running on:
Linux localhost 2.4.20-20.7smp #1 SMP Mon Aug 18 14:46:14 EDT 2003 i686 unknown
Red Hat Linux release 7.3 (Valhalla).

Thanks,
- -Jason Martin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.5 (GNU/Linux)
Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/

iD8DBQFAWdIkl2ODWuqVSBMRAhscAJsECVUsipbUAwIwfbqrxxS+SyMtnQCfQaDU
4m/lKVCHDJaLULg1wKe8w/4=
=1UzV
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click




More information about the Developers mailing list