| Summary: | net-dns/unbound fails to start if control-interface directory doesn't exist, instead of creating the requisite directory | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Michael Moon <triffid.hunter> |
| Component: | Current packages | Assignee: | Marc Schiffbauer <mschiff> |
| Status: | RESOLVED INVALID | ||
| Severity: | enhancement | CC: | floppym, jstein, whissi |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Michael Moon
2018-10-01 05:15:26 UTC
This doesn't work if "control-interface" is set to an interface which is more common.
I tend to reject this. I suggest to use opentmpfiles service, e.g. create
/etc/tmpfiles.d/unbound.conf
with
> d /var/run/unbound 0750 unbound unbound -
as content for example.
I've never heard of /etc/tmpfiles.d before, I guess it could work? I don't have opentmpfiles-setup in any of my runlevels though so apparently it may not be a default service in openrc and affected users would still have to hunt down this bug and rc-update.. Fwiw, most other init scripts use 'checkpath' function for this. If that's no longer the appropriate way, should they all be changed too? opentmpfiles is a default service for some time now. Not sure why it isn't enabled on your system. > Fwiw, most other init scripts use 'checkpath' function for this. If that's no longer the appropriate way, should they all be changed too? It depends: "checkpath" is a OpenRC thing. So especially when the same is needed for systemd I prefer tmpfiles.d solution. In this specific case using checkpath isn't an option because when you have set > control-interface 1.2.3.4 in your config, the mkdir call wouldn't be what you want. In other words: If we do that in runscript we must be 100% sure that it will work for everyone, not just for you who has set a valid path. :) > opentmpfiles is a default service for some time now. Not sure why it isn't enabled on your system. Apparently it only got pulled in in mid-february while this install is more than a year old, and Gentoo isn't in the habit of silently adding to my startup scripts for me. > In this specific case using checkpath isn't an option because when you have set > >> control-interface 1.2.3.4 > > in your config, the mkdir call wouldn't be what you want. In other words: If we do that in runscript we must be 100% sure that it will work for everyone, not just for you who has set a valid path. :) Fair enough, let's go with tmpfiles then Closing as INVALID since this issue does not occur with the default configuration. |