[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: pre-inst and post-inst scripts that start and stop daemons



bruce@Pixar.com (Bruce Perens) said:

> I think we should agree on an environment variable that I can set to
> tell the pre- and post-inst scripts not to start of kill daemons.
> Would "DEBIAN_NO_DAEMONS=1;export DEBIAN_NO_DAEMONS"
> be an appropriate thing to use?

Should each individual maintainer need to worry about this?  Should
you rely on all individual maintainers having handled this properly?

How about localizing the effect of this to /usr/sbin/start-stop-deamon,
by putting the conditional daemon start-stop code there?

Also, it strikes me that this DEBIAN_NO_DAEMONS variable name is less
descriptive than it could be.

Since the purpose is to control whether or not daemons are to be
started or stopped, perhaps DEBIAN_NO_STARTSTOP_DAEMONS would be a
better choice than DEBIAN_NO_DAEMONS.

Also, is it necessary to say "DEBIAN"?  Are there any such things
as "non-debian" daemons? If not, perhaps the "DEBIAN" can be dropped.
That leaves us with NO_STARTSTOP_DAEMONS.

Also, I wonder about the significance of the "=1".  Given the
functionality and the variable name, setting it to anything other
than "" should probably suppress starting/stopping of daemons.

Finally, presuming that the code conditioned on this environment
variable is localized to the start-stop-daemon script, the usage of
this environment variable should be clearly documented in (at least)
the start-stop-daemon(8) man page.

My $.02 worth of comments.


Reply to: