Gentoo Archives: gentoo-dev

From: Alin Dobre <alin@g.o>
To: gentoo-dev@××××××××××××.org
Subject: Re: [gentoo-dev] init scripts and start-stop-daemon
Date: Wed, 09 Mar 2005 17:54:12
Message-Id: 422F3854.3060801@gentoo.org
In Reply to: [gentoo-dev] init scripts and start-stop-daemon by Roy Marples
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 You have missed the situation when the daemon doesn't create any pid
5 file, which start-stop-daemon can do.
6 Also, it seems ok to me to use the start-stop-daemon in the stop()
7 function (combined with the --retry $TIME option is really great for
8 daemons that require a longer time to finish).
9 The rest, I agree with you.
10
11 Roy Marples wrote:
12 > I've noticed that some init scripts call start-stop-daemon when the
13 > "daemon" is really a shell script. This needs to be changed so that
14 > either
15 >
16 > 1) The call to start-stop-daemon is removed in the init script.
17 > This is logical as shell scripts are not daemons
18 >
19 > 2) Embed the functionality of the shell script in the init script so
20 > that the start-stop-daemon command really does launch the daemon.
21 >
22 > This change is required as future versions of baselayout will wrap the
23 > start-stop-daemon command to test that it has actually started and is
24 > still running. If it's not running then return failure instead of
25 > returning success as it does at the moment. Obviously this will fail if
26 > we're trying to launch a shell script!
27 >
28 > This solves many bugs where daemons launch fine and return success to
29 > start-stop-daemon but then die due to an invalid configuration file -
30 > named/bind is a good example of this.
31 >
32 > The only ebuild that I know of that requires this change is
33 > net-mail/courier-imap
34 >
35 > There may be others in the tree - only the ebuild maintainers will know.
36 > If you're an ebuild maintainer and install an init script, please check
37 > this otherwise when a baselayout-1.12.0 hits things will break.
38 >
39 > Another thing to stop doing is blindly rm -f pidfiles without testing to
40 > see if they exist or not as we now clean up pidfiles for you - if we
41 > can. This won't cause any problems other than an error message, so it's
42 > not a major issue, but I thought I'd let people know.
43 >
44 > Thanks
45 >
46
47 - --
48 Alin DOBRE
49 Romanian Lead Translator
50 Gentoo Documentation Project: http://www.gentoo.org/doc/en/
51 Gentoo.RO Community: http://www.gentoo.ro/
52 -----BEGIN PGP SIGNATURE-----
53 Version: GnuPG v1.2.6 (GNU/Linux)
54 Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
55
56 iD8DBQFCLzhTmG51ym6Hu9gRAgRaAKC+qANU2rD8/06PGovb7npS0MW9eACeMW3E
57 PXnQntKomXYDknzN0Fgi8mE=
58 =zXzI
59 -----END PGP SIGNATURE-----
60 --
61 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] init scripts and start-stop-daemon Roy Marples <uberlord@g.o>