git: 8548689c5b33 - stable/12 - resolver.5: Add an EXAMPLES section

From: Gordon Bergling <gbe_at_FreeBSD.org>
Date: Mon, 14 Nov 2022 08:29:00 UTC
The branch stable/12 has been updated by gbe (doc committer):

URL: https://cgit.FreeBSD.org/src/commit/?id=8548689c5b33bf7627b98919d8c73e26729873f8

commit 8548689c5b33bf7627b98919d8c73e26729873f8
Author:     Gordon Bergling <gbe@FreeBSD.org>
AuthorDate: 2022-11-07 11:09:43 +0000
Commit:     Gordon Bergling <gbe@FreeBSD.org>
CommitDate: 2022-11-14 08:28:53 +0000

    resolver.5: Add an EXAMPLES section
    
    In case local-unbound(8) fails for some reason, it could be useful
    to have a basic resolv.conf(5) example in the manual page.
    
    Reviewed by:    karels, pauamma
    Differential Revision:  https://reviews.freebsd.org/D37183
    
    (cherry picked from commit 4d00d772e9aa995f93da41883a1fea5e2e43f818)
---
 share/man/man5/resolver.5 | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/share/man/man5/resolver.5 b/share/man/man5/resolver.5
index 9b45d668f4c9..e2c78e8a3bc9 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 September 15, 2022
+.Dd November 7, 2022
 .Dt RESOLVER 5
 .Os
 .Sh NAME
@@ -220,6 +220,29 @@ The file
 resides in
 .Pa /etc .
 .El
+.Sh EXAMPLES
+A basic resolv.conf file could be in the following form.
+.Bd -literal -offset indent
+# The domain directive is only necessary, if your local
+# router advertises something like localdomain and you have
+# set up your hostnames via an external domain.
+domain localdomain.tld
+
+# In case you a running a local dns server or caching name server
+# like local-unbound(8) for example.
+nameserver 127.0.0.1
+
+# IP address of the local or ISP name service
+nameserver 192.168.2.1
+
+# Fallback nameservers, in this case these from Google.
+nameserver 8.8.8.8
+nameserver 4.4.4.4
+
+# Attach an OPT pseudo-RR for the EDNS0 extension,
+# as specified in RFC 2671.
+options edns0
+.Ed
 .Sh SEE ALSO
 .Xr gethostbyname 3 ,
 .Xr resolver 3 ,