Bug 182150

Summary: Moused start up with moused_enable="NO" into rc.conf
Product: Base System Reporter: Nilton Jose Rizzo <rizzo>
Component: confAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me CC: olevole
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Nilton Jose Rizzo 2013-09-16 12:20:00 UTC
     When I start my box, the moused is run.  My mouse is an USB mouse.
  I put in rc.conf this knob: moused_enable="NO", but is ignored by
  start up script and moused is run, this is a problem to the HAL, because
  the HAL try to open /dev/ums0 again and can't do it.  I  need  to change
  to text console and kill the moused process. I have to  logout from  
  account X ( via gdm) and I login again to mouse work.  It's started in
  two night ago.

How-To-Repeat: every start up process
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:13 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 Oleg Ginzburg 2021-12-28 11:53:33 UTC
The correct setting for disabling moused, mentioned in `man rc.conf`:

moused_nondefault_enable="NO"


More details:

/etc/devd.conf:
--
notify 100 {
        match "system" "DEVFS";
        match "subsystem" "CDEV";
        match "type" "CREATE";
        match "cdev" "atp[0-9]+";
        
        action "service moused quietstart $cdev";
};

notify 100 {
        match "system" "DEVFS";
        match "subsystem" "CDEV";
        match "type" "CREATE";
        match "cdev" "ums[0-9]+";

        action "service moused quietstart $cdev";
};

notify 100 {
        match "system" "DEVFS";
        match "subsystem" "CDEV";
        match "type" "CREATE";
        match "cdev" "wsp[0-9]+";
 
        action "service moused quietstart $cdev";
};
--

/etc/rc.d/moused processing when additional args passed:
--

if [ -n "$2" ]; then
        eval moused_$2_enable=\${moused_$2_enable-${moused_nondefault_enable}}
        rcvar="moused_${2}_enable"
        pidfile="${pidprefix}.$2.pid"
        pidarg="-I $pidfile"
fi
--


This is an opportunity for multiport configurations.

Therefore, a complete disabling of the 'moused' service should be done through:


sysrc moused_enable=NO
sysrc moused_nondefault_enable=NO

or per port:

sysrc moused_ums0_enable=NO
Comment 3 Oleg Ginzburg 2021-12-28 11:54:41 UTC
Not a bug/works as expected.

Please close this PR.