systemd-sysctl ignores duplicate assignments currently. For example, on my initial solution this triggered: $ /usr/lib/systemd/systemd-sysctl Duplicate assignment of kernel/sysrq in file '/etc/sysctl.d/99-sysrq.conf', ignoring. But in effect, this makes the 'override' order of sysctl.d files completely reverse. That is, if you set the same key in '10-foo.conf' and '50-foo.conf', the value from '10-foo.conf' would be applied rather than '50-foo.conf' as you'd expect.
I just ran into the exact same issue. I want to set kernel.sysrq=1 overriding the value from /usr/lib/sysctl.d/50-default.conf but because of the duplicate assignment restriction my only choice is to copy the supplied file to /etc/sysctl.d and modify it there. But then I will lose all future updates that systemd is going to do in /usr/lib/sysctl.d/50-default.conf.
(In reply to comment #1) > I just ran into the exact same issue. I want to set kernel.sysrq=1 > overriding the value from /usr/lib/sysctl.d/50-default.conf but because of > the duplicate assignment restriction my only choice is to copy the supplied > file to /etc/sysctl.d and modify it there. But then I will lose all future > updates that systemd is going to do in /usr/lib/sysctl.d/50-default.conf. You can also set it in /etc/sysctl.conf which overrides everything else.
Commit 04bf3c1a [1] contains a fix for that issue so hopefully this will be fixed in systemd-207. I tried it with the gentoo live ebuild and it works. [1] http://cgit.freedesktop.org/systemd/systemd/commit/?id=04bf3c1a60d82791e0320381e9268f727708f776
Closing then.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.