blob: f44e5c2cd86fea4a4a8b6f0ed809f4e912a491fc (
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
|
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
depend() {
before gpm
need hwsetup
}
start() {
# FIXME: If MOUSE_DEVICE is empty, we actually do not want to do anything, not even start gpm.
# created by hwsetup
source /etc/sysconfig/gentoo
source /etc/sysconfig/mouse
einfo "Mouse is ${HILITE}${MOUSE_FULLNAME}${NORMAL} at ${HILITE}${MOUSE_DEVICE}${NORMAL} ..."
if [ $(grep "#MOUSE=${MOUSETYPE}" /etc/conf.d/gpm) ]; then
sed -i "\@MOUSE=${MOUSETYPE}@s@^#@@" /etc/conf.d/gpm
else
echo "MOUSE=${MOUSETYPE}" >>/etc/conf.d/gpm
fi
if [ $(grep "#MOUSEDEV=${DEVICE}" /etc/conf.d/gpm) ]; then
sed -i "\@MOUSEDEV=${DEVICE}@s@^#@@" /etc/conf.d/gpm
else
echo "MOUSEDEV=${DEVICE}" >>/etc/conf.d/gpm
fi
}
# vim: ft=gentoo-init-d:
|