[arch-projects] [initscripts][RFC] deprecating ck_depends

Kurt J. Bosch kjb-temp-2009 at alpenjodel.de
Sat Jun 25 04:48:16 EDT 2011

Kurt J. Bosch, 2011-06-25 10:45:
> Tom Gundersen, 2011-06-23 17:37:
>> 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
>> 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
> ACK. Actually there already appears to be a warning at the very
> beginning of function kicking in whenever a daemon is starting another
> one. I'll just add a comment to ck_depends in my upcoming patches.
> --
> Kurt
Nevermind it is already there. :/

More information about the arch-projects mailing list