Gentoo Archives: gentoo-dev

From: Roy Marples <uberlord@g.o>
To: gentoo-dev@××××××××××××.org
Subject: [gentoo-dev] init scripts and start-stop-daemon
Date: Wed, 09 Mar 2005 17:19:20
Message-Id: 1110388757.10929.14.camel@uberlaptop.ubernet
1 I've noticed that some init scripts call start-stop-daemon when the
2 "daemon" is really a shell script. This needs to be changed so that
3 either
4
5 1) The call to start-stop-daemon is removed in the init script.
6 This is logical as shell scripts are not daemons
7
8 2) Embed the functionality of the shell script in the init script so
9 that the start-stop-daemon command really does launch the daemon.
10
11 This change is required as future versions of baselayout will wrap the
12 start-stop-daemon command to test that it has actually started and is
13 still running. If it's not running then return failure instead of
14 returning success as it does at the moment. Obviously this will fail if
15 we're trying to launch a shell script!
16
17 This solves many bugs where daemons launch fine and return success to
18 start-stop-daemon but then die due to an invalid configuration file -
19 named/bind is a good example of this.
20
21 The only ebuild that I know of that requires this change is
22 net-mail/courier-imap
23
24 There may be others in the tree - only the ebuild maintainers will know.
25 If you're an ebuild maintainer and install an init script, please check
26 this otherwise when a baselayout-1.12.0 hits things will break.
27
28 Another thing to stop doing is blindly rm -f pidfiles without testing to
29 see if they exist or not as we now clean up pidfiles for you - if we
30 can. This won't cause any problems other than an error message, so it's
31 not a major issue, but I thought I'd let people know.
32
33 Thanks
34
35 --
36 Roy Marples <uberlord@g.o>
37 Gentoo Linux Developer

Attachments

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

Replies

Subject Author
Re: [gentoo-dev] init scripts and start-stop-daemon Alin Dobre <alin@g.o>