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

Fixes #171 #172

Closed
wants to merge 3 commits into from
Closed

Fixes #171 #172

wants to merge 3 commits into from

Conversation

dekobon
Copy link
Collaborator

@dekobon dekobon commented Sep 13, 2023

This fix should strip comments from resolv.conf files before they are parsed by grep. This change assumes that grep and sed are the GNU variants.

This change adds support for building JSDoc docs
using nodejs. It also improves the JSDoc annotations
used in the njs source code.
@@ -35,7 +35,7 @@ if [ -z ${DNS_RESOLVERS+x} ]; then
resolvers=""
for ip in $(grep nameserver /etc/resolv.conf | cut -d' ' -f2 | xargs)
do
if echo "${ip}" | grep -q ':'; then
if echo "${ip}" | sed '/^[[:blank:]]*#/d;s/#.*//' | grep -q ':'; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the comment on the issue, did you look at https://github.com/nginxinc/docker-nginx/blob/master/entrypoint/15-local-resolvers.envsh for handling this?
It seems that in the case where DNS_RESOLVERS is not specified, we could potentially set it equal to the value of the env var exported by this script which I think should already have been run by this point?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, dang, I branched from the wrong commit. I'm going to redo this commit.

Copy link
Collaborator

@4141done 4141done left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks like it contains a lot more than the stated fix. Can we trim it down to the relevant changes? Also left a small comment on the relevant portion to check if we've explored a path suggested by the reporter.

@4141done
Copy link
Collaborator

4141done commented Oct 2, 2023

Closing in favor of #176 which does the same thing

@4141done 4141done closed this Oct 2, 2023
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 this pull request may close these issues.

2 participants