Configuration

通過萬用字元包含在 unbound.conf 中

  • January 12, 2015

根據其手冊頁(部分FORMAT)未綁定的配置指令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.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。

我想使用globforinclude語句只是後來版本中引入的一個功能。

引用自:https://serverfault.com/questions/658765