Bug 284 - unbound-checkconfig.exe reports wrong keyword when last line is a comment
unbound-checkconfig.exe reports wrong keyword when last line is a comment
Status: RESOLVED FIXED
Product: unbound
Classification: Unclassified
Component: server
1.4.0
i386 Windows
: P2 minor
Assigned To: unbound team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-30 12:30 CET by Andreas B
Modified: 2009-11-30 14:08 CET (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas B 2009-11-30 12:30:55 CET
unbound-checkconfig.exe is reporting an error, when the last line of the configuration file is a comment and not an empty line or a valid keyword.

This is just confusing new users, as they may copy statements from the sample configuration whith lots of comments:

C:\Program Files\Unbound\service.conf:33: error: unknown keyword '#' read C:\Program Files\Unbound\service.conf failed: 1 errors in configuration file
Comment 1 Wouter Wijngaards 2009-11-30 13:26:36 CET
This is because there is no return on that last line, the parser expects # followed by an end-of-line.  A workaround is to press enter at the end of the file.  (Must be windows text editing that is annoying here, I can reproduce on unix, but my text editors do not want to make such files).

Thanks for the report,
   Wouter
Comment 2 Wouter Wijngaards 2009-11-30 14:08:32 CET
Fix in svn trunk for the next release.
Best regards,
   Wouter