3 # $FreeBSD: head/etc/rc.d/moused 240336 2012-09-11 05:04:59Z obrien $
13 command="/usr/sbin/${name}"
14 start_cmd="moused_start"
15 stop_cmd="moused_stop"
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 # Set the mouse device and get any related variables. If
34 # a moused device has been specified on the commandline, then
35 # rc.conf(5) variables defined for that device take precedence
36 # over the generic moused_* variables. The only exception is
37 # the moused_port variable, which if not defined sets it to the
38 # passed in device name.
42 eval myflags=\${moused_${ms}_flags-$moused_flags}
43 eval myport=\${moused_${ms}_port-/dev/$ms}
44 eval mytype=\${moused_${ms}_type-$moused_type}
47 myflags="$moused_flags"
52 check_startmsgs && echo -n "Starting ${ms} moused"
53 /usr/sbin/moused ${myflags} -p ${myport} -t ${mytype} ${pidarg}
54 check_startmsgs && echo '.'
57 case ${mousechar_start} in
61 mousechar_arg="-M ${mousechar_start}"
65 for ttyv in /dev/ttyv* ; do
66 vidcontrol < ${ttyv} ${mousechar_arg} -m on