On 06/10/2022 22:38, Jessica Clarke wrote:
On 21 May 2022, at 15:42, Alfonso S. Siciliano <asicili...@freebsd.org> wrote:

The branch main has been updated by asiciliano:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=8cfbeb56aa160de1ea4f492abeb3aa029e84269f

commit 8cfbeb56aa160de1ea4f492abeb3aa029e84269f
Author:     Alfonso S. Siciliano <asicili...@freebsd.org>
AuthorDate: 2022-05-21 14:37:53 +0000
Commit:     Alfonso S. Siciliano <asicili...@freebsd.org>
CommitDate: 2022-05-21 14:42:23 +0000

    bsdinstall services: Improve mouse configuration

    bsdinstall(8) has an option to enable moused support.
    However, if it is not selected, moused is still started
    through the configuration of nondefault devices.
    So, automatically add the moused_nondefault_enable="NO"
    setting to rc.conf unless moused support is selected.

    PR:                     227999
    Reported by:            bcran
    Reviewed by:            bapt
    Differential Revision:  https://reviews.freebsd.org/D35193

I question the wisdom of this change. The text specifically says “PS/2
mouse pointer”, because moused_enable controls only the default mouse,
which rc.conf sets to /dev/psm0. Turning this option on or off would
therefore affect specifically the PS/2 mouse, precisely as described in
the dialog menu entry. USB mice would always remain enabled.

However, now, leaving the explicitly-PS/2 mouse option disabled *also*
disables non-default, i.e. USB, mice. Moreover, if you go and enable
the option so USB mice work, PS/2 mice are always enabled, but you may
not have a /dev/psm0. You may even be on an architecture where PS/2
does not exist; atkbdc, and thus psm, only exists for x86. This means
that, in those cases, enabling the option gives an error during boot
because /dev/psm0 doesn’t exist.

I can understand that some people want to turn off console mouse
support completely; however, with the current way moused works, that
cannot just be a single option that governs both moused_enable and
moused_nondefault_enable.

Jess


I'll revert this commit. The comment could be added to the PR to track the discussion only in one place.

Alfonso


---
usr.sbin/bsdinstall/scripts/services | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/usr.sbin/bsdinstall/scripts/services 
b/usr.sbin/bsdinstall/scripts/services
index f9141a523a31..1ac69fa63b2d 100755
--- a/usr.sbin/bsdinstall/scripts/services
+++ b/usr.sbin/bsdinstall/scripts/services
@@ -61,11 +61,17 @@ if [ $retval -ne $BSDDIALOG_OK ]; then
fi

havedump=
+havemouse=
for daemon in $DAEMONS; do
        [ "$daemon" = "dumpdev" ] && havedump=1 continue
+       [ "$daemon" = "moused" ] && havemouse=1
        echo ${daemon}_enable=\"YES\" >> $BSDINSTALL_TMPETC/rc.conf.services
done

+if [ ! "$havemouse" ]; then
+       echo moused_nondefault_enable=\"NO\" >> 
$BSDINSTALL_TMPETC/rc.conf.services
+fi
+
echo '# Set dumpdev to "AUTO" to enable crash dumps, "NO"' \
      'to disable' >> $BSDINSTALL_TMPETC/rc.conf.services
if [ "$havedump" ]; then



Reply via email to