sysctl man page says clearly: -p[FILE], --load[=FILE] however, the /etc/init.d/sysctl script tries: sysctl -q -e -p "${conf}" As the man page says, the -p parameter does not allow a space before the filename, it will then ignore the -p alltogether: supersmurf ~ # awk '/^[^#]/' /etc/sysctl.conf net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.all.rp_filter = 1 kernel.panic = 3 supersmurf ~ # awk '/^[^#]/' /etc/sysctl.d/ipv6.conf net.ipv6.conf.default.autoconf=0 net.ipv6.conf.default.accept_ra=0 net.ipv6.conf.default.disable_ipv6=0 net.ipv6.conf.all.autoconf=0 net.ipv6.conf.all.accept_ra=0 net.ipv6.conf.all.disable_ipv6=0 supersmurf ~ # sysctl -p /etc/sysctl.d/ipv6.conf net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.all.rp_filter = 1 kernel.panic = 3 supersmurf ~ # sysctl -p/etc/sysctl.d/ipv6.conf net.ipv6.conf.default.autoconf = 0 net.ipv6.conf.default.accept_ra = 0 net.ipv6.conf.default.disable_ipv6 = 0 net.ipv6.conf.all.autoconf = 0 net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.all.disable_ipv6 = 0 supersmurf ~ # Thanks :)
(In reply to comment #0) > As the man page says, the -p parameter does not allow a space before the > filename, it will then ignore the -p alltogether: Correction: it will just use the default file, /etc/sysctl.conf :)
On my system I get the following: linux1 ~ # sysctl -p/etc/sysctl.conf error: Unknown parameter "-p/etc/sysctl.conf" usage: sysctl [-n] [-e] variable ... sysctl [-n] [-e] [-q] -w variable=value ... sysctl [-n] [-e] -a sysctl [-n] [-e] [-q] -p <file> (default /etc/sysctl.conf) sysctl [-n] [-e] -A I am running sys-process/procps-3.2.8_p11. Which version are you running?
Confirmed on my system too. There should not be space between -p and [file]. I'm running sys-process/procps-3.3.2_p2-r1.
new sysctl is broken. the old syntax has worked for years.
fixed in 3.3.3