diff options
| author | Vladimir Kondratyev <wulf@FreeBSD.org> | 2025-09-21 13:14:48 +0000 |
|---|---|---|
| committer | Vladimir Kondratyev <wulf@FreeBSD.org> | 2025-09-22 09:22:12 +0000 |
| commit | d5f63d6b373890ce4654f27d89e281d3c4c265cf (patch) | |
| tree | 8fc51d231bea1b9e4d7190512dd9d68950300652 /libexec | |
| parent | 78b179fe928097f0e9e9ccc15857ceb2d4a43624 (diff) | |
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/rc/rc.conf | 2 | ||||
| -rwxr-xr-x | libexec/rc/rc.d/moused | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 82b6efa6ca62..2506bd45a53f 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -589,7 +589,7 @@ saver="NO" # screen saver: Uses /boot/kernel/${saver}_saver.ko moused_nondefault_enable="NO" # Treat non-default mice as enabled unless # specifically overridden in rc.conf(5). moused_enable="NO" # Run the mouse daemon. -moused_type="auto" # See man page for rc.conf(5) for available settings. +moused_type="evdev" # See man page for rc.conf(5) for available settings. moused_port="auto" # Set to your mouse port. moused_flags="" # Any additional flags to moused. mousechar_start="NO" # if 0xd0-0xd3 default range is occupied in your diff --git a/libexec/rc/rc.d/moused b/libexec/rc/rc.d/moused index aaf0dd0890a8..64e4f815eea9 100755 --- a/libexec/rc/rc.d/moused +++ b/libexec/rc/rc.d/moused @@ -16,6 +16,7 @@ start_cmd="moused_start" pidprefix="/var/run/moused" pidfile="${pidprefix}.pid" pidarg= +typearg= load_rc_config $name # doesn't make sense to run in a svcj: nojail keyword @@ -49,15 +50,17 @@ moused_start() eval myflags=\${moused_${ms}_flags-$moused_flags} eval myport=\${moused_${ms}_port-/dev/$ms} eval mytype=\${moused_${ms}_type-$moused_type} + if [ -n "$mytype" ] && check_kern_features evdev_support; then + typearg="-t ${mytype}" + fi else ms="default" myflags="$moused_flags" myport="$moused_port" - mytype="$moused_type" fi startmsg -n "Starting ${ms} moused" - /usr/sbin/moused ${myflags} -p ${myport} -t ${mytype} ${pidarg} + /usr/sbin/moused ${myflags} -p ${myport} ${typearg} ${pidarg} startmsg '.' mousechar_arg= |
