[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: default init on non-Linux platforms



On 19/02/14 15:09, Thomas Goirand wrote:
> First, yes, OpenRC uses /etc/runlevel, with the folders below that being
> the *names* of the runlevel (which IMO is a way more user friendly than
> just numbers). FYI, we have: shutdown=0, recovery=1, reboot=6, and
> everything-else=default. So we do have these 4 directory names, and
> OpenRC doesn't care about /etc/rc?.d.

Similar to systemd's multi-user.target etc. (which are made to depend on
native systemd units), then. However, systemd still needs to know
whether an LSB init script with no corresponding systemd unit should be
started or not, which it does by looking in /etc/rcX.d (I think it
assuems that anything started in any of rc[2345].d should be included in
multi-user.target).

> If systemd needs links in /etc/rcX.d, then I think it should be possible
> to hack something.

I suspect the right thing would be to share one implementation of
update-rc.d(8), invoke-rc.d(8) and possibly service(8) between all
supported init implementations, provided by either src:sysvinit or
src:init-system-helpers. The implementations in sysv-rc and
sysvinit-utils already seem to support sysv-rc[1], systemd and Upstart;
teaching them about OpenRC shouldn't be rocket science.

This has the advantage that if you install a daemon while your init is
sysvinit/sysv-rc, enable and/or disable it, then switch to systemd or
OpenRC and reboot, that daemon remains enabled or disabled (as appropriate).

    S

[1] and probably file-rc for that matter


Reply to: