git: 5f2dd3dfd72d - stable/15 - local-unbound: Read a tab separated resolv.conf
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 26 Nov 2025 15:35:16 UTC
The branch stable/15 has been updated by jlduran:
URL: https://cgit.FreeBSD.org/src/commit/?id=5f2dd3dfd72da7b49d1f9a7f889437480aa6f19e
commit 5f2dd3dfd72da7b49d1f9a7f889437480aa6f19e
Author: Jose Luis Duran <jlduran@FreeBSD.org>
AuthorDate: 2025-11-19 01:09:58 +0000
Commit: Jose Luis Duran <jlduran@FreeBSD.org>
CommitDate: 2025-11-26 15:33:29 +0000
local-unbound: Read a tab separated resolv.conf
Use [[:space:]] rather than a white space character to delimit the keys
and the values in the resolv.conf file.
PR: 236079
Reviewed by: des
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53811
(cherry picked from commit 0628400590e025b7db1c0905e6ee488a24ef3f60)
---
usr.sbin/unbound/setup/local-unbound-setup.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/usr.sbin/unbound/setup/local-unbound-setup.sh b/usr.sbin/unbound/setup/local-unbound-setup.sh
index 25cfef48b6f0..ec3aeb673ecc 100755
--- a/usr.sbin/unbound/setup/local-unbound-setup.sh
+++ b/usr.sbin/unbound/setup/local-unbound-setup.sh
@@ -118,8 +118,8 @@ set_chrootdir() {
get_nameservers() {
while read line ; do
local bareline=${line%%\#*}
- local key=${bareline%% *}
- local value=${bareline#* }
+ local key=${bareline%%[[:space:]]*}
+ local value=${bareline#*[[:space:]]}
case ${key} in
nameserver)
case ${value} in
@@ -145,8 +145,8 @@ gen_resolv_conf() {
local edns0=no
while read line ; do
local bareline=${line%%\#*}
- local key=${bareline%% *}
- local value=${bareline#* }
+ local key=${bareline%%[[:space:]]*}
+ local value=${bareline#*[[:space:]]}
case ${key} in
nameserver)
case ${value} in