Skip to content

OpenRC: fix network deps and support both supervisors#484

Merged
mozzieongit merged 3 commits into
NLnetLabs:masterfrom
orlitzky:two-openrc-improvements
May 12, 2026
Merged

OpenRC: fix network deps and support both supervisors#484
mozzieongit merged 3 commits into
NLnetLabs:masterfrom
orlitzky:two-openrc-improvements

Conversation

@orlitzky
Copy link
Copy Markdown
Contributor

@orlitzky orlitzky commented May 9, 2026

  1. Remove need net from the service dependencies. it's almost always wrong, and is in this case (the commit message explains why).
  2. Support both start-stop-daemon and supervise-daemon by moving the supervisor= line into the conf file. There are some things that s-s-d does that supervise-daemon still cannot do.

cc @lanodan

orlitzky added 3 commits May 9, 2026 17:20
The OpenRC documentation covers this pretty well:

  https://github.com/OpenRC/openrc/blob/master/service-script-guide.md

Network daemons almost never "need net":

  * If nsd listens on 0.0.0.0, it doesn't "need net" because 0.0.0.0
    isn't provided by the net service.

  * If it listens on a specific interface, then "need net" is wrong
    because it will be satisfied whenever some OTHER interface comes
    up (too soon). And with set rc_depend_strict=YES, it will come up
    only when ALL interfaces are up (too late).

In the second case, the user has to specify which interface he needs
himself. But in either, the "need net" gets removed to make it do the
right thing.
With supervisor=supervise-daemon defined in the service script, it is
no longer possible for users to override the default supervisor,
either in nsd's local conf file or globally in rc.conf.

First, we move the setting to the conf file that is meant to be
edited. Afterwards, the new default of supervise-daemon is kept, but
only when the variable is not already set (say, globally).
Support both start-stop-daemon and supervise-daemon as the $supervisor
with a case statement in reload(). The former is still the upstream
default when $supervisor is not any of the other options, so we match
"*" in that case.
@lanodan
Copy link
Copy Markdown
Contributor

lanodan commented May 10, 2026 via email

@mozzieongit mozzieongit merged commit f8d8866 into NLnetLabs:master May 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants