svn commit: r341010 - head/usr.sbin/unbound/setup
Dag-Erling Smørgrav
des at FreeBSD.org
Tue Nov 27 09:46:02 UTC 2018
Author: des
Date: Tue Nov 27 09:46:01 2018
New Revision: 341010
URL: https://svnweb.freebsd.org/changeset/base/341010
Log:
Check that /etc/resolv.conf exists before trying to read it.
Fix whitespace nit introduced in previous commit.
MFC after: 1 week
Modified:
head/usr.sbin/unbound/setup/local-unbound-setup.sh
Modified: head/usr.sbin/unbound/setup/local-unbound-setup.sh
==============================================================================
--- head/usr.sbin/unbound/setup/local-unbound-setup.sh Tue Nov 27 09:41:47 2018 (r341009)
+++ head/usr.sbin/unbound/setup/local-unbound-setup.sh Tue Nov 27 09:46:01 2018 (r341010)
@@ -218,7 +218,7 @@ gen_forward_conf() {
if [ "${use_tls}" = "yes" ] ; then
echo " forward-tls-upstream: yes"
sed -nE \
- -e "s/^(${RE_forward_tls})$/ forward-addr: \\1/p"
+ -e "s/^${RE_forward_tls}\$/ forward-addr: \\1/p"
else
sed -nE \
-e "s/^${RE_forward_addr}\$/ forward-addr: \\1/p" \
@@ -411,8 +411,10 @@ main() {
style=recursing
;;
"")
- echo "Extracting forwarders from ${resolv_conf}."
- forwarders=$(get_nameservers <"${D}${resolv_conf}")
+ if [ -f "${D}${resolv_conf}" ] ; then
+ echo "Extracting forwarders from ${resolv_conf}."
+ forwarders=$(get_nameservers <"${D}${resolv_conf}")
+ fi
style=dynamic
;;
*)
More information about the svn-src-head
mailing list