Commit 0deaed08 authored by Per Cederqvist's avatar Per Cederqvist

Don't attempt to use DNS when no nameserver is available.

* src/server/testsuite/Makefile.am (site.exp): Set use_dns to yes
or no depending on if adnshost can resolve 127.0.0.1 or not.
* src/server/testsuite/config/unix.exp (lyskomd_start): Set the
"Use DNS" configuration depending on the use_dns setting from
site.exp.
parent 61ea1682
2010-05-23 Per Cederqvist <ceder@lysator.liu.se>
Don't attempt to use DNS when no nameserver is available.
* src/server/testsuite/Makefile.am (site.exp): Set use_dns to yes
or no depending on if adnshost can resolve 127.0.0.1 or not.
* src/server/testsuite/config/unix.exp (lyskomd_start): Set the
"Use DNS" configuration depending on the use_dns setting from
site.exp.
2010-05-22 Per Cederqvist <ceder@lysator.liu.se>
Minor doc fix: DNS is non-blocking.
......
......@@ -174,7 +174,7 @@ check-test-sigjmp: test-sigjmp
(cd ../../libraries/adns/client && $(MAKE) check)
site.exp: Makefile ../../libraries/adns/client/adnshost
$(RM) $@ $@.tmp
$(RM) $@ $@.tmp $@.tmp.adns
echo "# this file is automatically generated by Makefile.am" > $@.tmp
echo "set l2g ./test-l2g" >> $@.tmp
echo "set top_srcdir $(top_srcdir)" >> $@.tmp
......@@ -184,9 +184,21 @@ site.exp: Makefile ../../libraries/adns/client/adnshost
else \
echo "set valgrind \"\"" >> $@.tmp ; \
fi
(../../libraries/adns/client/adnshost -i 127.0.0.1 2>/dev/null \
|| echo 1.0.0.127.in-addr.arpa PTR 127.0.0.1) \
| sed -e 's/.*PTR /set lyskomd_host "/' -e 's/$$/"/' -e q >> $@.tmp
@echo
@echo '## The next command takes 30 seconds' \
if you have no network connection.
@echo
if ../../libraries/adns/client/adnshost -i 127.0.0.1 \
2>/dev/null >$@.tmp.adns; \
then \
sed -e 's/.*PTR /set lyskomd_host "/' -e 's/$$/"/' -e q \
< $@.tmp.adns >> $@.tmp; \
echo 'set use_dns yes' >> $@.tmp; \
else \
echo 'set lyskomd_host "127.0.0.1"' >> $@.tmp; \
echo 'set use_dns no' >> $@.tmp; \
fi
$(RM) $@.tmp.adns
echo set valgrind_fd $(VALGRIND_FD) >> $@.tmp
echo set python \"$(PYTHON)\" >> $@.tmp
chmod 444 $@.tmp
......
......@@ -616,6 +616,7 @@ proc lyskomd_start {{aux_item_conf_file ""} \
global MEMTRACE
global line_leader
global any
global use_dns
obtain_lock
......@@ -661,6 +662,10 @@ proc lyskomd_start {{aux_item_conf_file ""} \
&& [regexp -nocase "Garb:" $base_config] == 0} {
puts $cf "Garb: on"
}
# lyskomd.0/bug-1318.exp explicitly disables "Use DNS".
if {[regexp -nocase "Use DNS:" $extra_config] == 0} {
puts $cf "Use DNS: $use_dns"
}
puts $cf "Pid file: etc/pid"
puts $cf "Memory usage file: etc/memory-usage"
puts $cf "Status file: etc/status"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment