resolvconf.confで複数のDNSを指定する方法は?

resolvconf.confで複数のDNSを指定する方法は?

"resolvconf -u"で実行するときに/etc/resolv.confの前に2つの追加のネームサーバーを追加するようにresolvconfを取得しようとしています。私の/etc/resolvconf.confファイルは次のとおりです。

# Configuration for resolvconf(8)
# See resolvconf.conf(5) for details

resolv_conf=/etc/resolv.conf
# If you run a local name server, you should uncomment the below line and
# configure your subscribers configuration files below.
name_servers=1.1.1.1 1.0.0.1

# Mirror the Debian package defaults for the below resolvers
# so that resolvconf integrates seemlessly.
dnsmasq_resolv=/var/run/dnsmasq/resolv.conf
pdnsd_conf=/etc/pdnsd.conf
unbound_conf=/var/cache/unbound/resolvconf_resolvers.conf

"resolvconf -u"コマンドを実行すると問題が発生します。次の結果が表示されます。

/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found
/sbin/resolvconf: 7: /etc/resolvconf.conf: 1.0.0.1: not found

name_servers 行に DNS を 1 つだけ指定すると正常に動作します。また、DNS定義を""でラップしようとしましたが、まだ許可されていません。ドキュメントに正しい構文に関する情報が見つかりません。

ベストアンサー1

/sbin/resolvconf実際、シェルスクリプトである構成ファイルはソーススクリプトにすぎないため、必要な構文はシェルスクリプトと同じです。

name_servers="1.1.1.1 1.0.0.1"

おすすめ記事