From d3fae78fe86f1dfcdb07fd613ccbb3adf547a617 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 29 Nov 2014 01:05:43 -0800 Subject: man: Factor out a common snippet for .d directories and precedence Several manpages contain duplicate text describing a standard set of .d configuration directories, with the usual sorting, precedence, overrides, and so on. Factor this common text out using XInclude before proliferating it even further. --- man/standard-conf.xml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 man/standard-conf.xml (limited to 'man/standard-conf.xml') diff --git a/man/standard-conf.xml b/man/standard-conf.xml new file mode 100644 index 000000000..b87d7e955 --- /dev/null +++ b/man/standard-conf.xml @@ -0,0 +1,45 @@ + + + + + + Configuration Directories and Precedence + + Configuration files are read from directories in + /etc/, /run/, and + /usr/lib/, in order of precedence. + Each configuration file in these configuration directories shall be named in + the style of filename.conf. + Files in /etc/ override files with the same name in + /run/ and /usr/lib/. Files in + /run/ override files with the same name in + /usr/lib/. + + Packages should install their configuration files in + /usr/lib/. Files in /etc/ are + reserved for the local administrator, who may use this logic to override the + configuration files installed by vendor packages. All configuration files + are sorted by their filename in lexicographic order, regardless of which of + the directories they reside in. If multiple files specify the same option, + the entry in the file with the lexicographically latest name will take + precedence. It is recommended to prefix all filenames with a two-digit number + and a dash, to simplify the ordering of the files. + + If the administrator wants to disable a configuration file supplied by + the vendor, the recommended way is to place a symlink to + /dev/null in the configuration directory in + /etc/, with the same filename as the vendor + configuration file. + + + + Configuration File + + Configuration is also read from a single configuration file in + /etc/. This file is read before any of the + configuration directories, and has the lowest precedence; entries in a file + in any configuration directory override entries in the single configuration + file. + + -- cgit v1.2.3