Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] sysvinit scripts
Date: Thu, 13 Jul 2006 02:25:38
Message-Id: 7573e9640607121915r175a1c57n2b51ea822dfd7723@mail.gmail.com
In Reply to: [gentoo-user] sysvinit scripts by Egon Kocjan
1 On 7/12/06, Egon Kocjan <egon.kocjan@××××.si> wrote:
2 > Is there another option like installing some sort of rcX.d
3 > compatibility?
4
5 The best option for your Gentoo users would be to install your init
6 script as /etc/$mypkg/init.d/$myinit, and have an additional
7 Gentoo/runscript compatible script that installs to /etc/init.d/ but
8 mainly just call the /etc/$mypkg/init.d/$myinit script. That would
9 allow us to continue to use our standard tools (rc-update) for
10 managing the init process, make sure you are compatible with parallel
11 startups, and so forth.
12
13 This should be fairly simple to create. Something like:
14
15 depend() {
16 need localmount
17 use logger net
18 }
19 start() {
20 test -x /etc/$mypkg/init.d/$myinit || \
21 eend 1 "myinit script not found. Aborting" || return 1
22 /etc/$mypkg/init.d/$myinit start
23 return $?
24 }
25 stop() {
26 /etc/$mypkg/init.d/$myinit stop
27 return $?
28 }
29
30 If your init script generates a bunch of output, you could optionally
31 add a function to process the output and make it look more like
32 Gentoo's standards. The current vmware init script may be a good
33 example of this.
34
35 Regards,
36 -Richard
37 --
38 gentoo-user@g.o mailing list