28

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?

migrated from stackoverflow.com Nov 8 '11 at 0:39

This question came from our site for professional and enthusiast programmers.

15

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.

  • 1
    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? – James McMahon Jul 31 '13 at 17:23
  • 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. – thomasrutter Oct 25 '17 at 9:49
9

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.

0

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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.