Merge pull request #2 from saradickinson/features/yaml

Change extension from .yaml to .yml
This commit is contained in:
Jim Hague 2017-09-13 17:56:47 +01:00 committed by GitHub
commit dcc6cd36c6
3 changed files with 6 additions and 6 deletions

View File

@ -245,7 +245,7 @@ $(distdir):
cp $(srcdir)/spec/example/*.[ch] $(distdir)/spec/example cp $(srcdir)/spec/example/*.[ch] $(distdir)/spec/example
cp $(srcdir)/src/tools/Makefile.in $(distdir)/src/tools cp $(srcdir)/src/tools/Makefile.in $(distdir)/src/tools
cp $(srcdir)/src/tools/*.[ch] $(distdir)/src/tools cp $(srcdir)/src/tools/*.[ch] $(distdir)/src/tools
cp $(srcdir)/stubby/stubby.yaml.example $(distdir)/stubby cp $(srcdir)/stubby/stubby.yml.example $(distdir)/stubby
cp $(srcdir)/stubby/stubby-setdns-macos.sh $(distdir)/stubby cp $(srcdir)/stubby/stubby-setdns-macos.sh $(distdir)/stubby
cp $(srcdir)/stubby/src/stubby.c $(distdir)/stubby/src cp $(srcdir)/stubby/src/stubby.c $(distdir)/stubby/src
cp $(srcdir)/stubby/COPYING $(distdir)/stubby cp $(srcdir)/stubby/COPYING $(distdir)/stubby

View File

@ -193,14 +193,14 @@ stubby.lo: $(stubbysrcdir)/src/stubby.c
stubby: stubby.lo libgetdns.la stubby: stubby.lo libgetdns.la
$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ stubby.lo $(LDFLAGS) libgetdns.la $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ stubby.lo $(LDFLAGS) libgetdns.la
install-stubby: stubby $(stubbysrcdir)/stubby.yaml.example $(stubbysrcdir)/stubby-setdns-macos.sh install-stubby: stubby $(stubbysrcdir)/stubby.yml.example $(stubbysrcdir)/stubby-setdns-macos.sh
$(INSTALL) -m 755 -d $(DESTDIR)$(bindir) $(INSTALL) -m 755 -d $(DESTDIR)$(bindir)
$(LIBTOOL) --mode=install cp stubby $(DESTDIR)$(bindir) $(LIBTOOL) --mode=install cp stubby $(DESTDIR)$(bindir)
$(INSTALL) -m 755 -d $(DESTDIR)$(sbindir) $(INSTALL) -m 755 -d $(DESTDIR)$(sbindir)
$(INSTALL) -m 755 $(stubbysrcdir)/stubby-setdns-macos.sh $(DESTDIR)$(sbindir) $(INSTALL) -m 755 $(stubbysrcdir)/stubby-setdns-macos.sh $(DESTDIR)$(sbindir)
$(INSTALL) -m 755 -d $(DESTDIR)$(stubbyconfdir) $(INSTALL) -m 755 -d $(DESTDIR)$(stubbyconfdir)
test -f $(DESTDIR)$(stubbyconfdir)/stubby.yaml || \ test -f $(DESTDIR)$(stubbyconfdir)/stubby.yml || \
$(INSTALL_DATA) $(stubbysrcdir)/stubby.yaml.example $(DESTDIR)$(stubbyconfdir)/stubby.yaml $(INSTALL_DATA) $(stubbysrcdir)/stubby.yml.example $(DESTDIR)$(stubbyconfdir)/stubby.yml
uninstall-stubby: uninstall-stubby:
$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/stubby $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(bindir)/stubby

View File

@ -215,7 +215,7 @@ print_usage(FILE *out, const char *progname)
fprintf(out, "\t-C\t<filename>\n"); fprintf(out, "\t-C\t<filename>\n");
fprintf(out, "\t\tRead settings from config file <filename>\n"); fprintf(out, "\t\tRead settings from config file <filename>\n");
fprintf(out, "\t\tThe getdns context will be configured with these settings\n"); fprintf(out, "\t\tThe getdns context will be configured with these settings\n");
fprintf(out, "\t\tThe file must be in YAML format (with extension of '.yaml')\n"); fprintf(out, "\t\tThe file must be in YAML format (with extension of '.yml')\n");
fprintf(out, "\t\tor JSON dict format (with extension '.conf')\n"); fprintf(out, "\t\tor JSON dict format (with extension '.conf')\n");
if (i_am_stubby) { if (i_am_stubby) {
fprintf(out, "\t\tBy default, configuration is first read from"); fprintf(out, "\t\tBy default, configuration is first read from");
@ -571,7 +571,7 @@ int parse_config_file(const char *fn, int report_open_failure)
} }
config_file[config_file_sz] = 0; config_file[config_file_sz] = 0;
fclose(fh); fclose(fh);
parse_config(config_file, strstr(fn, ".yaml") != NULL); parse_config(config_file, strstr(fn, ".yml") != NULL);
free(config_file); free(config_file);
return GETDNS_RETURN_GOOD; return GETDNS_RETURN_GOOD;
} }