From a455d42de27c9e135942d189e2a37b71f0df8738 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 6 Dec 2012 15:17:01 -0600 Subject: dnsmasq: only pass confdir if it exists (rh #873621) dnsmasq exits if the --conf-dir does not exist. Which isn't very useful. Inspired by Federico Simoncelli : https://mail.gnome.org/archives/networkmanager-list/2012-June/msg00011.html --- src/dns-manager/nm-dns-dnsmasq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/dns-manager/nm-dns-dnsmasq.c b/src/dns-manager/nm-dns-dnsmasq.c index d8202145ec..e07240c565 100644 --- a/src/dns-manager/nm-dns-dnsmasq.c +++ b/src/dns-manager/nm-dns-dnsmasq.c @@ -317,7 +317,11 @@ update (NMDnsPlugin *plugin, argv[idx++] = "--conf-file=" CONFFILE; argv[idx++] = "--cache-size=400"; argv[idx++] = "--proxy-dnssec"; /* Allow DNSSEC to pass through */ - argv[idx++] = "--conf-dir=" CONFDIR; + + /* dnsmasq exits if the conf dir is not present */ + if (g_file_test (CONFDIR, G_FILE_TEST_IS_DIR)) + argv[idx++] = "--conf-dir=" CONFDIR; + argv[idx++] = NULL; g_warn_if_fail (idx <= G_N_ELEMENTS (argv)); -- cgit v1.2.1