[oe] [meta-networking][PATCH] dnsmasq: steal resolvconf support from Ubuntu

Anders Darander anders at chargestorm.se
Wed Apr 6 13:01:15 UTC 2016


Hm, unfortunately I didn't notice before this went in.

* Jens Rehsack <rehsack at gmail.com> [160228 13:35]:

> Add support for resolvconf integration as done in Ubuntu. This implies
> updates of start-scripts, resolvconf plugin (on nameserver update ...),
> populate-volatiles control file for saved nameserver list.

> Signed-off-by: Jens Rehsack <sno at netbsd.org>
> ---

snip...

> diff --git a/meta-networking/recipes-support/dnsmasq/files/dnsmasq.service b/meta-networking/recipes-support/dnsmasq/files/dnsmasq.service
> index 549e15e..c3637e1 100644
> --- a/meta-networking/recipes-support/dnsmasq/files/dnsmasq.service
> +++ b/meta-networking/recipes-support/dnsmasq/files/dnsmasq.service
> @@ -5,8 +5,11 @@ After=network.target
>  [Service]
>  Type=forking
>  PIDFile=/run/dnsmasq.pid
> -ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid
> -ExecReload=/bin/kill -HUP $(/bin/cat /run/dnsmasq.pid)
> +ExecStartPre=/usr/sbin/dnsmasq --test
> +ExecStart=/etc/init.d/dnsmasq systemd-exec
> +ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf

This breaks on systemd-only distros. On those, the init scripts gets
removed during installation.

When patching out that removal, I'm also seeing that dnsmasq dies after
a few minuts.


Cheers,
Anders

> +ExecStopPre=/etc/init.d/dnsmasq systemd-stop-resolvconf
> +ExecReload=/bin/kill -HUP $MAINPID

>  [Install]
>  WantedBy=multi-user.target

-- 
Anders Darander, Senior System Architect
ChargeStorm AB / eStorm AB



More information about the Openembedded-devel mailing list