This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: The purpose of /etc/default ?


Yitzchak Scott-Thoennes wrote:

> > What does /etc/defaults mean under Cygwin? This should be documented
> > in the package contributors guide as well.
> 
> I think debian is on firmer ground than cygwin in putting files in
> /etc/defaults since they are sourced extensions of the real
> configuration files.

These two are separate concepts entirely.

In debian, /etc/default/ is a directory of mostly empty (or very small)
files.  The way it is meant to work is that each /etc/init.d/foobar
script first sources /etc/default/foobar before starting/stopping the
foobar service.  The purpose of the file is to provide extra options for
when starting the service, or override certain aspects of the service's
startup.  A common way this is used is so a package can go ahead and
install the whole /etc/rc.d/ structure for automatic startup/shutdown,
but not actually start it until the user edits /etc/default/foobar to
really enable it by setting "FOOBAR_ENABLED=1".  This way you don't have
to worry about daemons being automatically started when the user hasn't
yet configured them.

Note that these are NOT the actual primary configuration files that the
daemon uses -- those are always the standard /etc/foobar.conf-type
files.  The *only* purpose of these /etc/default/foobar files is to
provide extra overrides or startup options on top of whatever
configuration the daemon already has.  These are *not* templates and
they *are* meant to be user-edited.

That is completely different than cygwin's use of /etc/defaults/, which
is meant to be a tree of default conf files, to be copied into /etc/,
and used as the actual primary configuration file for whatever package. 
They are *not* meant to be user-edited.

Not that any of this really matters for this discussion, but the part in
debian about /etc/default/ is an entirely different concept than the
/etc/defaults/ in Cygwin.

Brian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]