summaryrefslogtreecommitdiffstats
path: root/share/man
diff options
context:
space:
mode:
authorvangyzen <vangyzen@FreeBSD.org>2015-10-14 14:26:44 +0000
committervangyzen <vangyzen@FreeBSD.org>2015-10-14 14:26:44 +0000
commit60458e70da25850f61b9877b8eae858c8ebe875d (patch)
tree898ee83d1d591faf4a93dd91b88fc597457060f4 /share/man
parentb800f004107ceb768773500aa53149cd9cc29f77 (diff)
downloadFreeBSD-src-60458e70da25850f61b9877b8eae858c8ebe875d.zip
FreeBSD-src-60458e70da25850f61b9877b8eae858c8ebe875d.tar.gz
resolver: automatically reload /etc/resolv.conf
On each resolver query, use stat(2) to see if the modification time of /etc/resolv.conf has changed. If so, reload the file and reinitialize the resolver library. However, only call stat(2) if at least two seconds have passed since the last call to stat(2), since calling it on every query could kill performance. This new behavior is enabled by default. Add a "reload-period" option to disable it or change the period of the test. Document this behavior and option in resolv.conf(5). Polish the man page just enough to appease igor. https://lists.freebsd.org/pipermail/freebsd-arch/2015-October/017342.html Reviewed by: kp, wblock Discussed with: jilles, imp, alfred MFC after: 1 month Relnotes: yes Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D3867
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man5/resolver.518
1 files changed, 15 insertions, 3 deletions
diff --git a/share/man/man5/resolver.5 b/share/man/man5/resolver.5
index 4116f23..a3c5e05 100644
--- a/share/man/man5/resolver.5
+++ b/share/man/man5/resolver.5
@@ -28,7 +28,7 @@
.\" @(#)resolver.5 8.1 (Berkeley) 6/5/93
.\" $FreeBSD$
.\"
-.Dd December 25, 2013
+.Dd October 12, 2015
.Dt RESOLVER 5
.Os
.Sh NAME
@@ -175,6 +175,19 @@ the resolver from obeying the standard
and
.Sy search
rules with the given name.
+.It Sy reload-period: Ns Ar n
+The resolver checks the modification time of
+.Pa /etc/resolv.conf
+every
+.Ar n
+seconds.
+If
+.Pa /etc/resolv.conf
+has changed, it is automatically reloaded.
+The default for
+.Ar n
+is two seconds.
+Setting it to zero disables the file check.
.El
.Pp
Options may also be specified as a space or tab separated list using the
@@ -191,8 +204,7 @@ If more than one instance of these keywords is present,
the last instance will override.
.Pp
The keyword and value must appear on a single line, and the keyword
-(e.g.\&
-.Sy nameserver )
+.Pq for example, Sy nameserver
must start the line.
The value follows the keyword, separated by white space.
.Sh FILES
OpenPOWER on IntegriCloud