Package: dnsmasq Version: 2.76-1.1 Severity: important Tags: patch Dear Maintainer,
Here's a one line patch that fixes system startups for dnsmasq, when dnsmasq has dhcp service conigured for a bridge interface. rrs@chutzpah:~$ diff -Naru /tmp/dnsmasq.service /lib/systemd/system/dnsmasq.service --- /tmp/dnsmasq.service 2016-07-15 13:36:25.095504187 +0530 +++ /lib/systemd/system/dnsmasq.service 2016-07-15 13:27:52.671464785 +0530 @@ -3,6 +3,7 @@ Requires=network.target Wants=nss-lookup.target Before=nss-lookup.target +After=network.target [Service] Type=forking Problem: On system startup, dnsmasq fails to load with following error ● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled) Drop-In: /run/systemd/generator/dnsmasq.service.d └─50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf Active: failed (Result: exit-code) since Fri 2016-07-15 13:24:11 IST; 1min 57s ago Jul 15 13:24:05 chutzpah systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server... Jul 15 13:24:08 chutzpah dnsmasq[2358]: dnsmasq: syntax check OK. Jul 15 13:24:11 chutzpah dnsmasq[2486]: dnsmasq: directory /etc/resolv.conf for resolv-file is missing, cannot poll Jul 15 13:24:11 chutzpah systemd[1]: dnsmasq.service: Control process exited, code=exited status=5 Jul 15 13:24:11 chutzpah systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server. Jul 15 13:24:11 chutzpah systemd[1]: dnsmasq.service: Unit entered failed state. Jul 15 13:24:11 chutzpah systemd[1]: dnsmasq.service: Failed with result 'exit-code'. ~ This happens because The default systemd unit only marks a Requires= on the network.target. As per the systemd documentation, requirement dependencies do not influence the order in which services are started and stopped. This has to be configured independently with the After=/Before= options With this patch, dnsmasq starts as usual during system boot-up. -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (990, 'unstable'), (990, 'testing'), (500, 'unstable-debug'), (100, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_IN, LC_CTYPE=en_IN (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages dnsmasq depends on: ii dnsmasq-base 2.76-1.1 ii init-system-helpers 1.39 ii netbase 5.3 dnsmasq recommends no packages. Versions of packages dnsmasq suggests: pn resolvconf <none> -- Configuration Files: /etc/default/dnsmasq changed: ENABLED=1 CONFIG_DIR=/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new IGNORE_RESOLVCONF=yes -- no debconf information