diff options
Diffstat (limited to 'src/clients/s6-dnsname.c')
-rw-r--r-- | src/clients/s6-dnsname.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/clients/s6-dnsname.c b/src/clients/s6-dnsname.c index 7c35f06..6531534 100644 --- a/src/clients/s6-dnsname.c +++ b/src/clients/s6-dnsname.c @@ -67,13 +67,8 @@ int main (int argc, char const *const *argv) if (t) tain_from_millisecs(&deadline, t) ; else deadline = tain_infinite_relative ; tain_add_g(&deadline, &deadline) ; - if (!s6dns_rci_init(&s6dns_rci_here, "/etc/resolv.conf")) - strerr_diefu1sys(111, "initialize structures from /etc/resolv.conf") ; - if (flaghosts) - { - flaghosts = s6dns_hosts_init(&s6dns_hosts_here, "/etc/hosts", "/etc/hosts.cdb", "/tmp/hosts.cdb") ; - if (flaghosts == -1) strerr_diefu1sys(111, "initialize hosts database from /etc/hosts or /etc/hosts.cdb") ; - } + if (!s6dns_init_options(flaghosts)) + strerr_diefu1sys(111, "parse /etc/resolv.conf or /etc/hosts") ; if (flaghosts) { |