Bugzilla – Bug 1075239
procps sysctl doesn't work
Last modified: 2018-03-02 18:09:22 UTC
On my Raspberry PI
Linux raspberrypi 4.1.19-1-rpi2 #1 SMP Sat Mar 12 14:22:44 UTC 2016 (03dcfb1) armv7l armv7l armv7l GNU/Linux
Name : procps
Version : 3.3.12
Release : 9.1
sysctl doesn't work.
sysctl -w net.ipv4.conf.eth0.proxy_arp=1
net.ipv4.conf.eth0.proxy_arp = 1
but the setting is still the old one
echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
Just noticed the same thing, fresh tumbleweed install on x86_64, /sbin/sysctl from package procps-3.3.12-9.2.x86_64
For the older, working versions, stracing a "sysctl -w net.ipv6.conf.all.disable_ipv6=1" shows:
open("/proc/sys/net/ipv6/conf/all/disable_ipv6", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
write(3, "1\n", 2) = 2
For the broken, tumbleweed-current /sbin/sysctl I instead see:
openat(AT_FDCWD, "/proc/sys/net/ipv6/conf/all/disable_ipv6", O_WRONLY|O_TRUNC) = 3
lseek(3, 1, SEEK_CUR) = 1
write(3, "0\0", 2) = 2
Observation: the broken one does not write a newline, but instead a nul byte.
Meanwhile, /usr/lib/systemd/systemd-sysctl as used during boot, keeps working fine (i.e. changes to /etc/sysctl.conf become active on next boot)
you are right, it is not only the arm-platform involved.
But your hint that systemd works, is not useful for me.
I need to change the setting also after the boot - with the "right" tool.
Of course I know the echo X > /proc/sys/... method as a workaround at the moment.
is no real replacement for sysctl.
(In reply to Thomas Schäfer from comment #2)
> But your hint that systemd works, is not useful for me.
> I need to change the setting also after the boot - with the "right" tool.
Sure! I did not want to imply systemd-sysctl would be a suitable replacement. Just meant that as an observation about what still works.
I also use "sysctl -p" in various places, e.g. rpm package POST scripts, to get freshly installed /etc/sysctl.d snippets activated. And all that fails now. I notice that even the openSUSE base system does that, e.g. the firewalld package contains a /etc/modprobe.d/firewalld-sysctls.conf calling out to /sbin/sysctl, which will be broken now, too.
Testing with current Tumbleweed (x86_64), I find this bug is fixed.
I can confirm that it works again.