On Mon, 19 Oct 2020, Craig Small wrote:
On Mon, 19 Oct 2020 at 15:51, Matthew Gabeler-Lee <chee...@fastcat.org>
wrote:
Aah, no, I can't, that's my point. Because /etc/sysctl.d/ is read before
package-shipped files, then it doesn't matter what file I put it in, it
will still be overridden by package-shipped files in (/usr)/lib.
Did you test this?
I thought I did, and the results I thought I got seemed to match up with
the documentation: /usr/lib overrides /etc. But it seems that my "test"
was faulty and the documentation is confusing.
The documentation states the order the directories are read in, but the
files do not seem to be applied in that order at all. Instead the files
seem to be applied in order of their base name, and the directory order
is only used to de-duplicate files with the same base name. I would have
never figured that out from reading this paragraph in the documentation:
Files are read from directories in the following list in given order
from top to bottom. Once a file of a given filename is loaded, any
file of the same name in subsequent directories is ignored.
That says to me that it processes everything from the first directory,
and then everything that doesn't have an overlapping name from the
second directory, and so on, but that is _not_ what it does at all, as
your example demonstrates.
The "test" then got confused because some pacakges (tracker-miner-fs is
the one that tripped me up) run selective sysctl updates in their
postinst, leaving the system in an inconstent state after an apt
upgrade.
--
-- Matt
"Reality is that which, when you stop believing in it, doesn't go away".
-- Philip K. Dick
GPG fingerprint: 0061 15DF D282 D4A9 57CE 77C5 16AF 1460 4A3C C4E9