Solved [Solved] understand the deprecated "-w" option in sysctl

I have a FreeBSD 9.2-RELEASE and according to man sysctl the -w option has been deprecated and is silently ignored. Am I correct that for example sysctl -w net.inet.ip.forwarding=1 still enables IP forwarding, but one could use the sysctl net.inet.ip.forwarding=1 command instead, i.e. it's not mandatory to use -w option to change kernel parameters?
 
Re: understand the deprecated "-w" option in sysctl

It's not mentioned in the man page but FreeBSD 10-STABLE seems to completely ignore the -w option.

Edit: It is mentioned, at the bottom.
Code:
COMPATIBILITY
     The -w option has been deprecated and is silently ignored.

To be honest I don't think I've ever used the option to write sysctl(8).
 
Re: understand the deprecated "-w" option in sysctl

There was indeed a time when it was mandatory to change a sysctl values using the -w option. But that may be as far back as FreeBSD 2 or 3.
 
Back
Top