5

I am trying to make resolvconf prepend two additional nameservers to /etc/resolv.conf when run with "resolvconf -u". My /etc/resolvconf.conf file is as follows:

# 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

The problem emerges when I run the command "resolvconf -u", this is the output I get:

/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

If I specify just ONE SINGLE DNS in the name_servers line it works fine. I also tried to wrap the DNS definitions with "", but it still doesn't accept them. I can't find anything about the correct syntax in the manual.

1
  • 1
    repeat the line name_servers=x.x.x.x for each DNS server you want to specify.
    – Mio Rin
    May 3, 2018 at 3:15

1 Answer 1

11

/sbin/resolvconf is actually a shell script, and the configuration files are just sourced scripts, so the syntax you'll need is the same as with shell scripts:

name_servers="1.1.1.1 1.0.0.1"
1
  • Why is a simple example like this Not in the manpage? Would have saved me 5 minutes searching the internet
    – Rucent88
    Jan 22 at 21:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .