Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Non-opnerc init scripts
Date: Mon, 21 May 2018 20:11:31
Message-Id: CAGfcS_=mk+0SS22kqzyP9QVLN7YN408XAq+7j6NmwjtFvBH3pQ@mail.gmail.com
In Reply to: [gentoo-user] Re: Non-opnerc init scripts by Ian Zimmerman
1 On Mon, May 21, 2018 at 3:43 PM Ian Zimmerman <itz@××××××××××××.org> wrote:
2
3 > openrc scripts have their own "API". Converting a straight sysvinit
4 > script into an openrc one takes some work. Look at some existing
5 > openrc script to see the kind of work that is needed.
6
7
8 Unless the upstream script does quite a bit you're usually better off
9 starting with a generic OpenRC init.d script and just tweaking it vs trying
10 to convert a non-openrc script into an openrc one.
11
12 Another option is to just create an openrc script wrapper that just calls
13 the upstream one, which is installed elsewhere.
14
15 Ideally though you want to get pid files and such to show up in the right
16 place. However, if this is for oss I'm not sure you're even launching any
17 daemons vs just setting mixer levels and such. If you aren't actually
18 leaving any processes running calling the upstream script from a wrapper
19 should be pretty harmless. I haven't used openrc since it got cgroup
20 support but I suspect it is better about cleaning up orphans these days as
21 well.
22
23 --
24 Rich