On Sat, Sep 16, 2017 at 3:56 PM, Vadim A. Misbakh-Soloviov
<gen...@mva.name> wrote:
>
> I'd like to suggest to remove `service` widget from openrc and make it the
> part of (which package? baselayout?)?

IMO this really should go in its own package.  By all means have
openrc and/or systemd pull it in by default, but this gives everybody
a bit more control.  This was the approach with functions.sh as well.

>
> P.S. actually, it also would be nice to add "generators" thing to it too, to
> make it possible to manage services that have no systemd's units under SystemD
> and services that have only units under OpenRC (well, that one looks much
> harder than first variant, but, again, looks like deb/ubuntu guys did that
> work already and we can try to use their work as cheatsheet)
>

We don't really have the same situation that they do.  IMO this is
best done by having some kind of wrapper that needs to be manually
invoked.  I think most people would want to know the first time they
go to start a service that wasn't really tested under their particular
configuration.  The service might not work the way they expect, so
they'd want to pay closer attention to it, for a start.

Wrapping systemd units into openrc scripts should be relatively easy,
because they're descriptive.  You just need a parser of some kind.
The only issue I see is any code that has to run in global context -
I'm not sure how well openrc behaves when dependency parsing starts
running code.

Going in the other direction will be harder, but probably is possible.

Honestly, though, it isn't like it is that hard to write a unit or
script, so I think most people are going to prefer to hand-write them.
One of the really nice things about Gentoo is that whether you use
openrc or systemd you get a completely native experience without a ton
of duct-tape adapting one system into a completely different one, full
of caveats and stuff that doesn't behave like you'd expect.  IMO the
only other distro that delivers a similar experience with systemd is
Arch, and they don't support openrc really.

But, nobody is going to complain if you create a tool that creates
init.d scripts or units automatically for you.  People can use it as
they wish, and it might or might not make a good starting point for a
new script/unit.

-- 
Rich

Reply via email to