summaryrefslogtreecommitdiff
path: root/src/dns-manager/nm-dns-dnsmasq.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2012-12-06 15:17:01 -0600
committerDan Williams <dcbw@redhat.com>2012-12-06 15:18:28 -0600
commita455d42de27c9e135942d189e2a37b71f0df8738 (patch)
tree16dbe46fcade683e2ed80fdb258ba6edbbbc375d /src/dns-manager/nm-dns-dnsmasq.c
parentfcdbf17f35f624d8816928a98a43d5f6cbb1df99 (diff)
downloadNetworkManager-a455d42de27c9e135942d189e2a37b71f0df8738.tar.gz
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 <fsimonce@redhat.com>: https://mail.gnome.org/archives/networkmanager-list/2012-June/msg00011.html
Diffstat (limited to 'src/dns-manager/nm-dns-dnsmasq.c')
-rw-r--r--src/dns-manager/nm-dns-dnsmasq.c6
1 files changed, 5 insertions, 1 deletions
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));