Try to ensure that the directories our config files want to live in exist.
[openresolv] / dnsmasq.in
index a120189ba99421252d06cfe21623d2d74a911cdf..9c7fdeef96704e9535b187ba75d3fff6fd52fa6e 100644 (file)
@@ -93,6 +93,13 @@ for d in $DOMAINS; do
        done
 done
 
+# Try to ensure that config dirs exist
+if type config_mkdirs >/dev/null 2>&1; then
+       config_mkdirs "$dnsmasq_conf" "$dnsmasq_resolv"
+else
+       @PREFIX@/sbin/resolvconf -D "$dnsmasq_conf" "$dnsmasq_resolv"
+fi
+
 changed=false
 if [ -n "$dnsmasq_conf" ]; then
        if [ ! -f "$dnsmasq_conf" ] || \