Bug 41666

Summary: sysctl -w used in docs, though "-w" is deprecated and ignored
Product: Documentation Reporter: Mark Stosberg <mark>
Component: Books & ArticlesAssignee: Marc Fonvieille <blackend>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Mark Stosberg 2002-08-14 17:10:01 UTC
This may or may not be a bug, depending on your documentation policy. :) I noticed that there are several mentions in the current documentation of "sysctl -w", although the "-w" doesn't mean anything on current systems. If your goal with the documentation is to focus on the current systems, it might make sense to remove the now-useless "-w" option from these examples. However, if you want to leave it there to remain compatible with older versions of FreeBSD, that makes sense too.

Fix: 

Remove "-w" option in these locations
How-To-Repeat: Here's a simple grep that catches several mentions of this. There may be others:

[/usr/share/doc/handbook]
root@reidhosp> grep -R 'sysctl -w' * ../faq/
book.html:              command <tt class="COMMAND">sysctl -w
book.html:                      class="COMMAND">sysctl -w
book.html:"USERINPUT"><b>sysctl -w kern.fallback_elf_brand=3</b></tt>
Binary file book.txt matches
linuxemu-mathematica.html:"USERINPUT"><b>sysctl -w kern.fallback_elf_brand=3</b></tt>
linuxemu-mathematicau.html:"USERINPUT"><b>sysctl -w kern.fallback_elf_brand=3</b></tt>
natd.html:                "COMMAND">sysctl -w net.inet.ip.forwarding=1</tt>
pppoe.html:        class="COMMAND">sysctl -w
./faq/book.html:"USERINPUT"><b>sysctl -w kern.timecounter.method=1</b></tt>
./faq/book.html:"USERINPUT"><b>sysctl -w kern.timecounter.hardware=i8254</b></tt>
./faq/book.html:"USERINPUT"><b>sysctl -w vfs.usermount=1</b></tt>
./faq/book.html:"USERINPUT"><b>sysctl -w net.inet.icmp.icmplim=300</b></tt>
./faq/book.html:"USERINPUT"><b>sysctl -w net.inet.icmp.icmplim_output=0</b></tt>
./faq/troubleshoot.html:"USERINPUT"><b>sysctl -w kern.timecounter.method=1</b></tt>
./faq/troubleshoot.html:"USERINPUT"><b>sysctl -w kern.timecounter.hardware=i8254</b></tt>
./faq/networking.html:"USERINPUT"><b>sysctl -w net.inet.icmp.icmplim=300</b></tt>
./faq/networking.html:"USERINPUT"><b>sysctl -w net.inet.icmp.icmplim_output=0</b></tt>
Binary file ../faq/book.txt matches
./faq/disks.html:"USERINPUT"><b>sysctl -w vfs.usermount=1</b></tt>
Comment 1 Marc Fonvieille freebsd_committer freebsd_triage 2002-08-14 22:54:55 UTC
Responsible Changed
From-To: freebsd-doc->blackend

I'll take this.
Comment 2 Marc Fonvieille freebsd_committer freebsd_triage 2002-08-15 22:05:32 UTC
State Changed
From-To: open->closed

I fixed it in the Handbook since this latter covers 4.X branch. 
For the FAQ and the articles, it should not be changed: sysctl -w is the 
only way to set a sysctl variable for 2.X and 3.X (the FAQ covers 2.X, 
3.X and 4.X).