xref: /openbsd-src/sbin/resolvd/resolvd.8 (revision f1dd7b858388b4a23f4f67a4957ec5ff656ebbe8)
1.\"	$OpenBSD: resolvd.8,v 1.6 2021/05/02 15:15:44 deraadt Exp $
2.\"
3.\" Copyright (c) 2021 Florian Obser <florian@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: May 2 2021 $
18.Dt RESOLVD 8
19.Os
20.Sh NAME
21.Nm resolvd
22.Nd a daemon to handle nameserver configuration
23.Sh SYNOPSIS
24.Nm
25.Op Fl dv
26.Sh DESCRIPTION
27.Nm
28handles the contents of
29.Pa /etc/resolv.conf ,
30which contains details of the system's DNS nameservers, and is
31read by the resolver routines in the C library.
32Nameservers are learned from various sources, incorporated in a priority
33order, then user-edited information found in the pre-existing file is
34re-appended.
35.Pp
36.Nm
37checks whether
38.Xr unwind 8
39is running, and if so places
40.Pp
41.Dl nameserver 127.0.0.1
42.Pp
43at the top, to cause local resolution.
44.Pp
45.Nm
46also monitors the routing socket for proposals learned by
47.Xr dhclient 8 ,
48.Xr dhcpleased 8 ,
49.Xr slaacd 8 ,
50or network devices which natively learn DNS information such as
51.Xr umb 4 .
52.Pp
53These proposals are added in priority order, but commented out
54if
55.Xr unwind 8
56is running.
57.Pp
58After that,
59.Nm
60appends all user-edited lines found in the file.
61.Pp
62.Nm
63also notices if the
64.Pa /etc/resolv.conf
65file is edited, and will rewrite the file, re-blending the various
66pieces of information.
67It will also create
68.Pa /etc/resolv.conf
69if it does not exist or if it is empty.
70.Pp
71The options are as follows:
72.Bl -tag -width Ds
73.It Fl d
74Do not daemonize.
75If this option is specified,
76.Nm
77will run in the foreground and log to
78.Em stderr .
79.It Fl v
80Produce more verbose output.
81.El
82.Sh SEE ALSO
83.Xr resolv.conf 5 ,
84.Xr dhclient 8 ,
85.Xr dhcpleased 8 ,
86.Xr slaacd 8 ,
87.Xr unwind 8
88.Sh HISTORY
89The
90.Nm
91program first appeared in
92.Ox 6.9 .
93