34

For the first time I was asked by a daemon I installed to set a flag in there.

What's it for? Is it a newish concept?

1

3 Answers 3

19

From a post on a Slackware forum:

... this is a Debian concept that has been adopted by a few packages.

Basically, /etc/default contains some parameters that the end user or administrator is likely to change, rather than embedding the values in the actual boot scripts. In this way, changes will persist even if you upgrade the package and the boot script is replaced.

2
  • 2
    Does this mean the user is expected to edit the default config directly or does the program on default to that location if there is no other config available? Jul 31, 2013 at 17:23
  • 1
    The config options there are for the user to edit directly. Don't be fooled by the word "default". Maybe think "initconfig" instead. It's a config for for the script that starts the service. Oct 25, 2017 at 9:49
12

The files in this dir basically contains configuration parameters. For example, if you have a service at /etc/init.d/test, the script first look at /etc/default/test before starting/stopping the test service, searching for config parameters.

2

/etc/default/<service> contains configuration options related to the starting of that service. It's used by the init scripts that start the service, as opposed to the package configuration in/etc/<program> which is used by the program itself.

It's a common place to allow you, for example, to set command line options or environment variables for use when starting the daemon.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .