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
This commit is contained in:
Dan Williams 2012-12-06 15:17:01 -06:00
parent fcdbf17f35
commit a455d42de2

View file

@ -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));