Bump .Dd for r1.31.
[dragonfly.git] / etc / rc.d / moused
blobf2fdd314a97d09fa6a50f3b487c1f8cddf280790
1 #!/bin/sh
3 # $NetBSD: moused,v 1.1 2001/10/29 23:25:01 augustss Exp $
4 # $FreeBSD: src/etc/rc.d/moused,v 1.3 2002/09/27 16:54:21 gordon Exp $
5 # $DragonFly: src/etc/rc.d/moused,v 1.4 2005/11/19 21:47:32 swildner Exp $
8 # PROVIDE: moused
9 # REQUIRE: DAEMON
11 . /etc/rc.subr
13 name=moused
14 rcvar=`set_rcvar`
15 command="/usr/sbin/${name}"
16 start_cmd="moused_start"
17 stop_cmd="moused_stop"
18 sig_stop="-INT"
20 # stdin must be redirected because it might be for a serial console
22 viddev=/dev/ttyv0
24 moused_start()
26 echo -n 'Starting moused:'
27 /usr/sbin/moused ${moused_flags} -p ${moused_port} -t ${moused_type}
29 _mousechar_arg=
30 case ${mousechar_start} in
31 [Nn][Oo] | '')
34 echo -n ' mousechar_start'
35 _mousechar_arg="-M ${mousechar_start}"
37 esac
39 vidcontrol < ${viddev} ${_mousechar_arg} -m on
41 echo '.'
44 moused_stop()
46 pids="`check_process $command`"
47 if [ -n "$pids" ]; then
48 for pid in $pids; do
49 kill $sig_stop $pid
50 done
53 vidcontrol < ${viddev} -m off
56 load_rc_config $name
57 run_rc_command "$1"