Bug 236079 - [PATCH] local-unbound-setup cannot read resolv.conf with tabs as a separator
Summary: [PATCH] local-unbound-setup cannot read resolv.conf with tabs as a separator
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 11.2-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2019-02-27 11:15 UTC by Miroslav Lachman
Modified: 2019-02-27 16:25 UTC (History)
0 users

See Also:


Attachments
replace tabs by space (322 bytes, patch)
2019-02-27 11:15 UTC, Miroslav Lachman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Lachman 2019-02-27 11:15:39 UTC
Created attachment 202406 [details]
replace tabs by space

In resolv.conf keyword "nameserver" and its value (IP address) can be separated by spaces or tabs but local-unbound-setup accepts only spaces resulting in:

No forwarders found in resolv.conf, using existing forward.conf.

I am not so good in shellscripting so I fixed it by this line

local line=$(echo $line | sed -E 's/	/ /g')

I don't know how to write it as parameter expansion instead of calling sed in a subshell.