How Should An Application Honour Configuration Files

From LinuxMCE
Revision as of 05:47, 28 February 2013 by Posde (Talk | contribs)

(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

The following list contains the run down an application should follow when working with configuration information:

  1. Each application has sane defaults and initializes all variables accordingly.
  2. If a global configuration file exists (/etc/xxxxx), the content of the configuration file takes precedence.
  3. If a private configuration file exists (~/.xxxxx), the content of the private configuration takes precedence.
  4. If commandline options exist, the commandline option take precedence.
  5. If an input form for configuraiton information exist, it gets filled with the vars up to this point.
  6. If an input form for configuration information exist, the user gets can either be asked if the private configuration file should be overwritten with the new information, or it can be done automatically.