mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-06-16 02:35:58 +00:00
(F18) sysctl: give files with later names precedence over earlier ones
This restores the sysctl.d precedence rules of v197.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
cb5ec34519
commit
e52f3bf8e7
+1
-1
@@ -92,7 +92,7 @@
|
||||
alphabetical order, regardless in which of the
|
||||
directories they reside, to guarantee that a specific
|
||||
configuration file takes precedence over another file
|
||||
with an alphabetically later name, if both files
|
||||
with an alphabetically earlier name, if both files
|
||||
contain the same variable setting.</para>
|
||||
|
||||
<para>If the administrator wants to disable a
|
||||
|
||||
+3
-1
@@ -306,7 +306,9 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
r = parse_file(sysctl_options, "/etc/sysctl.conf", true);
|
||||
|
||||
STRV_FOREACH(f, files) {
|
||||
/* F18: iterate backwards to preserve v197's behaviour */
|
||||
f = files + strv_length(files) - 1;
|
||||
STRV_FOREACH_BACKWARDS(f, files) {
|
||||
k = parse_file(sysctl_options, *f, true);
|
||||
if (k < 0 && r == 0)
|
||||
r = k;
|
||||
|
||||
Reference in New Issue
Block a user