Gentoo Archives: gentoo-dev

From: William Hubbs <williamh@g.o>
To: gentoo-dev@l.g.o
Cc: grknight@g.o
Subject: Re: [gentoo-dev] s6.eclass: new eclass for installing s6 services
Date: Mon, 01 Jun 2015 18:24:38
Message-Id: 20150601182426.GA32493@linux1.gaikai.biz
In Reply to: Re: [gentoo-dev] s6.eclass: new eclass for installing s6 services by Brian Evans
1 On Mon, Jun 01, 2015 at 01:39:01PM -0400, Brian Evans wrote:
2 > Can support be added for a run/finish log script?
3 > Should be no big deal to add what amounts to
4 >
5 > doexe $(s6_get_servicedir)/$name/log
6 > newexe run-s6 run
7 >
8 > Otherwise i may just cheat and use $name/log as the name on a second
9 > call since the eclass does not do any $name validation.
10
11 I'm open to it, I'm just not sure how I would make it happen since the
12 finish script for the service itself is optional. For example:
13
14 s6_install_service service script-1 script-2
15
16 In the above, script-2 is optional and could either be the finish script
17 for ${service} or the run script for ${service}/log, which is a service
18 itself.
19
20 The only way I can think of to allow service and log service
21 installation at the same time would be to use a reserved value such as
22 "none" to indicate that a script should be skipped. If I did that, to
23 install a run script and a log run script might look like:
24
25 s6_install_service service run-script none log-run-script
26
27 If you have a finish script, the call would be:
28
29 s6_install_service service run-script finish-script log-run-script
30
31 For either of these calls, there would also be an optional final
32 argument which would be the log-finish-script.
33
34 The tradeoff here would be that whatever I choose to indicate that a
35 script is skipped can't be used as a file name.
36
37 What do you think?
38
39 William

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] s6.eclass: new eclass for installing s6 services William Hubbs <williamh@g.o>