xref: /openbsd-src/sbin/resolvd/resolvd.8 (revision d89ec533011f513df1010f142a111086a0785f09)
1.\"	$OpenBSD: resolvd.8,v 1.9 2021/11/11 05:52:03 bket 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: November 11 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 sppp 4
52or
53.Xr umb 4 .
54Proposals can also be sent using the
55.Xr route 8
56.Cm nameserver
57command.
58.Pp
59These proposals are added in priority order, but commented out
60if
61.Xr unwind 8
62is running.
63.Pp
64After that,
65.Nm
66appends all user-edited lines found in the file.
67.Pp
68.Nm
69also notices if the
70.Pa /etc/resolv.conf
71file is edited, and will rewrite the file, re-blending the various
72pieces of information.
73It will also create
74.Pa /etc/resolv.conf
75if it does not exist or if it is empty.
76.Pp
77The options are as follows:
78.Bl -tag -width Ds
79.It Fl d
80Do not daemonize.
81If this option is specified,
82.Nm
83will run in the foreground and log to
84.Em stderr .
85.It Fl v
86Produce more verbose output.
87.El
88.Sh SEE ALSO
89.Xr resolv.conf 5 ,
90.Xr dhclient 8 ,
91.Xr dhcpleased 8 ,
92.Xr route 8 ,
93.Xr slaacd 8 ,
94.Xr unwind 8
95.Sh HISTORY
96The
97.Nm
98program first appeared in
99.Ox 6.9 .
100