Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 480042 - net-dns/dnsmasq - systemd unit file improvement
Summary: net-dns/dnsmasq - systemd unit file improvement
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-07 11:15 UTC by Mehmet Giritli
Modified: 2014-06-21 08:41 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mehmet Giritli 2013-08-07 11:15:27 UTC
I'd like to suggest addition of the following lines to the dnsmasq.service file:

First, I suggest adding

After=network.target

in [Unit]. Otherwise I was having dnsmasq boot startup problems with interfaces no being ready yet.

Secondly, I'd suggest adding user and group info for the process to run:

ExecStart=/usr/sbin/dnsmasq -k --user=dnsmasq --group=dnsmasq

Note that this is already the "old" behaviour with openrc init file.

Reproducible: Always
Comment 1 Patrick McLean gentoo-dev 2013-08-07 23:10:48 UTC
I have no idea about systemd, CCing the systemd herd.

What do you guys think? If you agree please attach the new unit file and I will include it next time I do a version bump (there should be a new version coming out soon).
Comment 2 Pacho Ramos gentoo-dev 2013-09-21 13:59:13 UTC
(In reply to Mehmet Giritli from comment #0)
> I'd like to suggest addition of the following lines to the dnsmasq.service
> file:
> 
> First, I suggest adding
> 
> After=network.target
> 
> in [Unit]. Otherwise I was having dnsmasq boot startup problems with
> interfaces no being ready yet.

Your are true, the line would be:
After=network.target

Just after "Description" line and under "Unit" part

> 
> Secondly, I'd suggest adding user and group info for the process to run:
> 
> ExecStart=/usr/sbin/dnsmasq -k --user=dnsmasq --group=dnsmasq
> 
> Note that this is already the "old" behaviour with openrc init file.
> 
> Reproducible: Always

I don't know how is this being done downstream on gentoo -> in other distributions they don't specify the user and group but, if we are needing that, no problem with changing ExecStart in that way
Comment 3 Patrick McLean gentoo-dev 2013-12-10 19:55:51 UTC
Done in net-dns/dnsmasq-2.68
Comment 4 Martin Väth 2014-06-21 08:41:48 UTC
There are two issues with this fix:

1. I think the correct target for current systemd should be After=network-online.target (at least, I still had the same problems with After=network.target).

2. Why is in $FILESDIR the same file twice with only a different name?

Should I reopen or file a new bug?