7 # REQUIRE: DAEMON FILESYSTEMS
8 # KEYWORD: nojail shutdown
15 command="/usr/sbin/${name}"
16 start_cmd="moused_start"
17 pidprefix="/var/run/moused"
18 pidfile="${pidprefix}.pid"
22 # Set the pid file and variable name. The second argument, if it exists, is
23 # expected to be the mouse device.
26 eval moused_$2_enable=\${moused_$2_enable-${moused_nondefault_enable}}
27 rcvar="moused_${2}_enable"
28 pidfile="${pidprefix}.$2.pid"
34 local ms myflags myport mytype
36 # Set the mouse device and get any related variables. If
37 # a moused device has been specified on the commandline, then
38 # rc.conf(5) variables defined for that device take precedence
39 # over the generic moused_* variables. The only exception is
40 # the moused_port variable, which if not defined sets it to the
41 # passed in device name.
45 eval myflags=\${moused_${ms}_flags-$moused_flags}
46 eval myport=\${moused_${ms}_port-/dev/$ms}
47 eval mytype=\${moused_${ms}_type-$moused_type}
50 myflags="$moused_flags"
55 check_startmsgs && echo -n "Starting ${ms} moused"
56 /usr/sbin/moused ${myflags} -p ${myport} -t ${mytype} ${pidarg}
57 check_startmsgs && echo '.'
60 case ${mousechar_start} in
64 mousechar_arg="-M ${mousechar_start}"
68 for ttyv in /dev/ttyv* ; do
69 vidcontrol < ${ttyv} ${mousechar_arg} -m on