Bug 198648 - resolvconf does not modify pdnsd.conf correctly
Summary: resolvconf does not modify pdnsd.conf correctly
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-17 03:38 UTC by Henry Hu
Modified: 2016-10-14 01:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Hu 2015-03-17 03:38:45 UTC
Currently, when setting pdnsd_conf in resolvconf.conf, resolvconf does not change pdnsd.conf correctly. The result looks like this:

...
# Generated by resolvconf
server {\n\tlabel=resolvconf;\n\tip=192.168.1.1;\n}\nserver {\n\tinclude=.lan.;\n\tpolicy=excluded;\n\tip=192.168.1.1;\n}\n# End of resolvconf

In other words, newline should be inserted, but "\n" was inserted instead. pdnsd refuses to start with this configuration.

In /usr/src/contrib/openresolv/pdnsd.in, it uses
		printf %s "$newconf" >> "$cf"
In the old versions of openresolv, %s was not present, and it works correctly. In the latest version of openresolv (3.6.2), "\n" is not used, but $NL is used, so it should also work. But current version in our repo was 3.4.4, which has this problem.

Please import new version of openresolv to fix the problem.
Comment 1 Henry Hu 2016-10-14 01:33:36 UTC
New openresolv has been imported. The bug is fixed.