Re: /etc/examples/sysctl.conf wrong Xref + key lacking information

2019-09-10 Thread Todd C . Miller
On Tue, 10 Sep 2019 12:59:51 +0200, Solene Rapenne wrote:

> I looked at /etc/examples/sysctl.conf on an amd64 system and found 2
> things:
>
> - file refers to sysctl(3) and sysctl(8). sysctl(3) doesn't exists but
>   sysctl(2) exists, I think we want a 2

Yes, sysctl(3) was renamed to sysctl(2) some time ago.
OK millert@

> - the default value 1 for key machdep.pwraction=1 is not documented,
>   comment says # ACPI power button action: 0=none, 2=suspend
>
> this is defined in etc/etc.amd64/sysctl.conf, I guess the default is
> 1=shutdown

We usually document the non-default settings in the comments, not
the default ones.  I'm not sure we need to change this especially
since it increases the length of the comment past 80 columns.
I don't feel too strongly about this though.

 - todd



/etc/examples/sysctl.conf wrong Xref + key lacking information

2019-09-10 Thread Solene Rapenne
Hi

I looked at /etc/examples/sysctl.conf on an amd64 system and found 2
things:

- file refers to sysctl(3) and sysctl(8). sysctl(3) doesn't exists but
  sysctl(2) exists, I think we want a 2

Index: sysctl.conf
===
RCS file: /data/cvs/src/etc/examples/sysctl.conf,v
retrieving revision 1.4
diff -u -p -r1.4 sysctl.conf
--- sysctl.conf 3 Apr 2015 15:50:28 -   1.4
+++ sysctl.conf 10 Sep 2019 10:50:13 -
@@ -1,7 +1,7 @@
 #  $OpenBSD: sysctl.conf,v 1.4 2015/04/03 15:50:28 millert Exp $
 #
 # This file contains a list of sysctl options the user wants set at
-# boot time.  See sysctl(3) and sysctl(8) for more information on
+# boot time.  See sysctl(2) and sysctl(8) for more information on
 # the many available variables.
 #
 #net.inet.ip.forwarding=1  # 1=Permit forwarding (routing) of IPv4 packets


- the default value 1 for key machdep.pwraction=1 is not documented,
  comment says # ACPI power button action: 0=none, 2=suspend

this is defined in etc/etc.amd64/sysctl.conf, I guess the default is
1=shutdown

Index: etc/etc.amd64/sysctl.conf
===
RCS file: /data/cvs/src/etc/etc.amd64/sysctl.conf,v
retrieving revision 1.8
diff -u -p -r1.8 sysctl.conf
--- etc/etc.amd64/sysctl.conf   19 Jan 2019 20:50:38 -  1.8
+++ etc/etc.amd64/sysctl.conf   10 Sep 2019 10:58:36 -
@@ -1,4 +1,4 @@
 #machdep.allowaperture=2   # See xf86(4)
 #machdep.kbdreset=1# permit console CTRL-ALT-DEL to do a nice halt
 #machdep.lidaction=0   # 1=suspend, 2=hibernate laptop upon lid closing
-#machdep.pwraction=1   # ACPI power button action: 0=none, 2=suspend
+#machdep.pwraction=1   # ACPI power button action: 0=none, 1=shutdown, 
2=suspend