[arch-projects] [initscripts][RFC] deprecating ck_depends
Tom Gundersen
teg at jklm.no
Thu Jun 23 11:37:51 EDT 2011
Hi guys,
I'm trying to resolve FS#20903, and I think the only sensible solution is to
stop using the ck_depends function. I'd like to hear your opinion on this.
This is the situation:
ck_depends was introduced in
<http://projects.archlinux.org/initscripts.git/commit/?id=2c9681f461a0cde98a88de65e232369df68ed859>
as a simple mechanism to implement dependencies.
What it does, is that it allows an rc script to start other rc scripts.
However, it is not equivalent to adding the depedent rc scripts to the DAEMONS
array. The problem is that at shutdown, we have no record of when the
dependencies were started, and therefore treat them as if they were started by
the user during runtime.
The end result is that the dependencies of a daemon are started before the
daemon (as expected), but also stopped before the daemon (contrary to the
expectation).
I don't think parsing the rc scripts at shutdown to figure out the dependencies
could work, nor do I think it is in the spirit of our initscripts. The only
correct solution (IMHO) to resolve a dependency is to ask the user to add the
relevant daemon to the DAEMONS array.
I therefore suggest marking ck_depends as deprecated, and print a warning
whenever it is used.
Did I miss something? Any opinions?
Cheers,
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://mailman.archlinux.org/pipermail/arch-projects/attachments/20110623/25dbb002/attachment.asc>
More information about the arch-projects
mailing list