Manpages - resolvconf.8

manages

files from multiple sources, such as DHCP and VPN clients. Traditionally, the host runs just one client and that updates

More modern systems frequently have wired and wireless interfaces and there is no guarantee both are on the same network. With the advent of VPN and other types of networking daemons, many things now contend for the contents of

solves this by letting the daemon send their

file to

via

with the argument

instead of the filesystem.

then updates

as it thinks best. When a local resolver other than libc is installed, such as

or

then

will supply files that the resolver should be configured to include.

assumes it has a job to do. In some situations

needs to act as a deterrent to writing to

Where this file cannot be made immutable or you just need to toggle this behaviour,

can be disabled by adding

to

can mark an interfaces

as private. This means that the name servers listed in that

are only used for queries against the domain/search listed in the same file. This only works when a local resolver other than libc is installed. See

for how to configure

to use a local name server and how to remove the private marking.

can mark an interfaces

as exclusive. Only the latest exclusive interface is used for processing, otherwise all are.

When an interface goes down, it should then call

with

arguments to delete the

file(s) for all the

on the

For systems that support the concept of persisting configuration when the carrier goes down, then it should instead call

with

arguments to deprecate the matching interfaces and

to activate the matching interfaces when the carrier comes up. This only affects the order in which interfaces are processed.

Here are some options for the above commands:-

Ignore non existent interfaces. Only really useful for deleting interfaces.

Set the metric of the interface when adding it, default of 0. Lower metrics take precedence. This affects the default order of interfaces when listed.

Marks the interface

as private.

Mark the interface

as exclusive when adding, otherwise only use the latest exclusive interface.

has some more commands for general usage:-

List the interfaces and protocols, optionally matching

we have

files for.

List the

files we have. If

is specified then we list the files for the interfaces and protocols that match it.

Force

to update all its subscribers.

does not update the subscribers when adding a resolv.conf that matches what it already has for that interface.

Echo the resolvconf version to

also has some commands designed to be used by it’s subscribers and system startup:-

Initialise the state directory

This only needs to be called if the initial system boot sequence does not automatically clean it out; for example the state directory is moved somewhere other than

If used, it should only be called once as early in the system boot sequence as possible and before

is used to add interfaces.

Echo the command used to restart a service.

If the

is running then restart it. If the service does not exist or is not running then zero is returned, otherwise the result of restarting the service.

Echo variables DOMAINS, SEARCH and NAMESERVERS so that the subscriber can configure the resolver easily.

Same as

except that only the information configured in

is set.

For

to work effectively, it has to process the resolv.confs for the interfaces in the correct order.

first processes interfaces from the

list, then interfaces without a metic and that match the

list, then interfaces with a metric in order and finally the rest in the operating systems lexical order. See

for details on these lists.

Here are some suggested protocol tags to use for each

file registered on an

Dynamic Host Configuration Protocol. Initial versions of

did not recommend a

tag be appended to the

name. When the protocol is absent, it is assumed to be the DHCP protocol.

Point-to-Point Protocol.

IPv6 Router Advertisement.

Dynamic Host Configuration Protocol, version 6.

If a subscriber has the executable bit then it is executed otherwise it is assumed to be a shell script and sourced into the current environment in a subshell. This is done so that subscribers can remain fast, but are also not limited to the shell language.

Portable subscribers should not use anything outside of

and

because

and others may not be available when booting. Also, it would be unwise to assume any shell specific features.

If the

option is not present then we use

for the metric.

Marks the interface

as private.

Marks the interface

as exclusive.

Backup file of the original resolv.conf.

Configuration file for

Directory of subscribers which are run every time

adds, deletes or updates.

Directory of subscribers which are run after the libc subscriber is run.

State directory for

This implementation of

is called openresolv and is fully command line compatible with Debian’s resolvconf, as written by Thomas Hood.

Please report them to

does not validate any of the files given to it.

When running a local resolver other than libc, you will need to configure it to include files that

will generate. You should consult

for instructions on how to configure your resolver.

Author: dt

Created: 2022-02-20 Sun 09:52