[systemd-devel] Modifying kernel vars through sysctl.d

Lennart Poettering lennart at poettering.net
Thu Jun 20 11:34:25 PDT 2013


On Thu, 20.06.13 12:24, Belal, Awais (Awais_Belal at mentor.com) wrote:

> Hi,
> 
> I am trying to update a kernel variable on boot. So, after reading a bit here and there I found out that I could simply provide a .conf file under /etc/sysctl.d/ and have my required configs in it. I placed a file ipv6.conf under the mentioned directory with the contents:
> 
> net.ipv6.conf.eth0.disable_ipv6=0
> 
> so I could enable ipv6 on my eth0 interface on boot. Oddly enough this isn't working as I expected and doing a 'cat /proc/sys/net/ipv6/conf/eth0/disable_ipv6' still gives me '1'. I checked the status of the systemd-sysctl.service and it shows up as 'active (exited)'. If I do a 'systemctl restart systemd-sysctl.service' after boot the configuration gets through as needed.
> 
> What am I doing wrong? Are there any better ways of achieving the same?

This should just work. Maybe you have some other network managing
service that overides this again?

If you run "strace -e open /usr/lib/systemd/systemd-sysctl" as root, do
you see the file opened in /proc/sys?


Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list