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