What is the purpose of /etc/default?

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.


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.


/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.

Tags:

Ubuntu