summaryrefslogtreecommitdiff
blob: 53f25e7a4fa9b1fa2cea7af814556803231ea699 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-libs/gpm/files/gpm.rc6,v 1.11 2004/03/06 04:18:36 vapier Exp $

#NB: Config is in /etc/conf.d/gpm

depend() {
	need localmount
	use hotplug logger
}

checkconfig() {
	if [ -z "$MOUSEDEV" ] || [ -z "$MOUSE" ] ; then
		eerror "You need to setup MOUSEDEV and MOUSE in /etc/conf.d/gpm first"
		return 1
	fi
}

start() {
	checkconfig || return 1

	local params=""
	[ -n "$RESPONSIVENESS" ] && params="$params -r $RESPONSIVENESS"
	[ -n "$REPEAT_TYPE" ]    && params="$params -R$REPEAT_TYPE"
	[ -n "$APPEND" ]         && params="$params $APPEND "
	
	ebegin "Starting gpm"
	start-stop-daemon --start --quiet --exec /usr/sbin/gpm \
		-- -m ${MOUSEDEV} -t ${MOUSE} ${params}
	eend ${?}
}

stop() {
	ebegin "Stopping gpm"
	start-stop-daemon --stop --quiet --pidfile /var/run/gpm.pid
	eend ${?}
}