rc.d: rename vfs_accounting to vfs_quota
[dragonfly.git] / etc / rc.d / moused
CommitLineData
9c600e7d
MD
1#!/bin/sh
2#
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 $
696a5717 5# $DragonFly: src/etc/rc.d/moused,v 1.4 2005/11/19 21:47:32 swildner Exp $
9c600e7d
MD
6#
7
8# PROVIDE: moused
9# REQUIRE: DAEMON
9c600e7d
MD
10
11. /etc/rc.subr
12
13name=moused
14rcvar=`set_rcvar`
15command="/usr/sbin/${name}"
283b4f06 16start_cmd="moused_start"
fdca0659
CP
17stop_cmd="moused_stop"
18sig_stop="-INT"
19
20# stdin must be redirected because it might be for a serial console
21#
22viddev=/dev/ttyv0
9c600e7d
MD
23
24moused_start()
25{
26 echo -n 'Starting moused:'
27 /usr/sbin/moused ${moused_flags} -p ${moused_port} -t ${moused_type}
28
29 _mousechar_arg=
30 case ${mousechar_start} in
31 [Nn][Oo] | '')
32 ;;
33 *)
34 echo -n ' mousechar_start'
35 _mousechar_arg="-M ${mousechar_start}"
36 ;;
37 esac
38
fdca0659
CP
39 vidcontrol < ${viddev} ${_mousechar_arg} -m on
40
9c600e7d
MD
41 echo '.'
42}
43
fdca0659
CP
44moused_stop()
45{
46 pids="`check_process $command`"
47 if [ -n "$pids" ]; then
48 for pid in $pids; do
49 kill $sig_stop $pid
50 done
51 fi
52
53 vidcontrol < ${viddev} -m off
54}
55
9c600e7d
MD
56load_rc_config $name
57run_rc_command "$1"