3 # Borrowing heavily from the dnsmasq initscript's version of support for
4 # resolvconf, intended for use in systemd-only configurations.
6 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
7 DAEMON=/usr/sbin/dnsmasq
10 # Most configuration options in /etc/default/dnsmasq are deprecated
12 if [ -r /etc/default/$NAME ]; then
18 # If interface "lo" is explicitly disabled in /etc/default/dnsmasq
19 # Then dnsmasq won't be providing local DNS, so don't add it to
20 # the resolvconf server set.
21 for interface in $DNSMASQ_EXCEPT
23 [ $interface = lo ] && return
26 if [ -x /sbin/resolvconf ] ; then
27 echo "nameserver 127.0.0.1" |
28 /sbin/resolvconf -a lo.$NAME
35 if [ -x /sbin/resolvconf ] ; then
36 /sbin/resolvconf -d lo.$NAME
56 echo "Usage: /etc/init.d/$NAME {start|stop|restart}" >&2