Hello. Matt Zimmerman schrieb: > On Fri, Jul 07, 2000 at 04:49:29PM -0700, Joey Hess wrote: > > /etc/init.d/foo: > > > > #!/bin/sh > > # Don't touch these .. > > FOO=bar > > NEWVAR=/tmp/killme > > # .. edit this file instead! > > if [ -f /etc/default/foo ]; then > > . /etc/default/foo > > fi > > # > > rm -rf /$NEWVAR > > start-stop-daemon foo -- $FOO > > > > So the point is, init scripts could set all the variables to sane > > settings, and allow sourcing the file to overwrite those settings, and > > this becomes a non-problem. > > Another idea (presented elsewhere in this thread) would be to have defaults > and overrides side-by-side in the configuration directory, e.g.: > > /etc/default/package.default > /etc/default/package.override > > ...where both files have the same syntax, package.override is a conffile, and > package.default is not. This would solve the problem of supplying defaults > for > new variables.
If an init-script introduces a new variable, you will have to update the initscript anyway to use it. IMO having the defaults in the initscript is more sensible. Else you would have to check for the variables anyway, since a rm -rf /$FOO would be unfortunate if /etc/default/package.default got deleted for some reason. ciao, 2ri -- Tomorrow will be canceled due to lack of interest.

