通过通配符包含在 unbound.conf 中

通过通配符包含在 unbound.conf 中

根据其手册页(部分格式) unbound 的配置指令include: “[...] 可用于包含多个文件,请参阅 glob(7)。”

现在,无论该指令是否

include: /etc/unbound/zones/*.conf

或一般,包括

include: /etc/unbound/zones/*

服务启动时我收到的消息是:

Restarting recursive DNS server: unbound/etc/unbound/unbound.conf:17: error: 
     cannot open include file '/etc/unbound/zone/*': No such file or directory
read /etc/unbound/unbound.conf failed: 1 errors in configuration file
[1420997682] unbound[17125:0] fatal error: Could not read config file: 
     /etc/unbound/unbound.conf

只有完全限定的文件名才有效。

我该如何解释手册页的内容?我解释错了吗?glob应该允许通配符,对吗?


系统信息:RasPi 上的 Debian Wheezy,Unbound 1.4.17-3+deb7u2

答案1

这是 1.4.17-3+deb7u2 版本的unbound.conf(5)手册页所说的内容include

  Files  can be included using the include: directive. It can appear any‐
  where, and takes a single filename as an argument.  Processing  contin‐
  ues  as  if  the text from the included file was copied into the config
  file at that point.  If also using chroot, using full  path  names  for
  the  included  files  works,  relative pathnames for the included names
  work  if  the  directory  where  the  daemon  is  started  equals   its
  chroot/working directory.

如您所见,本节中引用通配符的句子以及glob未绑定网站的手册页(当前版本的手册页,此时为 1.5.1)在 1.4.17-3 + deb7u2 的手册页中不存在。

我认为使用globinclude语句只是后来版本中引入的一个功能。

相关内容