git: 0628400590e0 - main - local-unbound: Read a tab separated resolv.conf
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 19 Nov 2025 01:12:26 UTC
The branch main has been updated by jlduran:
URL: https://cgit.FreeBSD.org/src/commit/?id=0628400590e025b7db1c0905e6ee488a24ef3f60
commit 0628400590e025b7db1c0905e6ee488a24ef3f60
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-19 01:09:58 +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
---
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