What is the difference between /etc/init/ and /etc/init.d/? More generally, what meaning does the ".d" suffix convey to a directory?
|
¹ not counting initrd |
|||||
|
|
As you point out, the ".d" nomenclature is puzzling and strange, and doesn't really have any place in any modern system -- you'll notice that most modern services have tended to drop it. The reason the directory is |
||||
|
|
|
The ".d" is usually appended to a directory name to indicate that what used to be (or what could have been) handled by a single script or a single configuration file has been split into multiple files for the sake of convenience, but which should be included, or executed, together. For example, /etc/apache/conf.d/ or /etc/apt/sources.d/ In cases where it's important which order they should be included/executed, the files in these directories sometimes start with a number, like "00-default" or "80-user" so that they execute in the right order. In the case of /etc/init.d/ it sort of indicates that the scripts in init.d should all be executed. Nowadays, however, the init system of modern operating systems is a bit more involved than that, but the directory name is still there. |
|||
|