Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not work if resolv.conf uses tabs instead of spaces #85

Open
telnetdoogie opened this issue Dec 11, 2023 · 0 comments · May be fixed by #86
Open

does not work if resolv.conf uses tabs instead of spaces #85

telnetdoogie opened this issue Dec 11, 2023 · 0 comments · May be fixed by #86

Comments

@telnetdoogie
Copy link

Running this script on synology out-of-the-box incorrectly gathers invalid nameservers for the host.

cat /etc/resolv.conf | grep ^nameserver | cut -d " " -f 2 | sed 's/\(.*\)/&#&/'
nameserver	192.168.1.1#nameserver	192.168.1.1

...this is resolved by adding cut -f 2 (which uses the default tab delimiter for cut) and it also continues to work on other OSes where the space is used. I'll create a PR for this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant