summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/gpm/files/gpm.rc629
1 files changed, 23 insertions, 6 deletions
diff --git a/sys-libs/gpm/files/gpm.rc6 b/sys-libs/gpm/files/gpm.rc6
index e460100fe6ef..845d1a66ca66 100644
--- a/sys-libs/gpm/files/gpm.rc6
+++ b/sys-libs/gpm/files/gpm.rc6
@@ -1,13 +1,30 @@
#!/sbin/runscript
+#you can move these into your rc.conf file if you wish
+#MOUSEDEV=/dev/psaux
+#MOUSE=ps2
+
+need() {
+ need localmount
+}
+
+checkconfig() {
+ if [ -z "$MOUSEDEV" ] || [ -z "$MOUSE" ] ; then
+ eerror "You need to setup MOUSEDEV and MOUSE first"
+ return 1
+ fi
+}
+
start() {
- ebegin "Starting gpm"
- start-stop-daemon --start --quiet --exec /usr/sbin/gpm -- -m ${MOUSEDEV} -t ${MOUSE}
- eend ${?}
+ checkconfig || return 1
+ ebegin "Starting gpm"
+ start-stop-daemon --start --quiet --exec /usr/sbin/gpm \
+ -- -m ${MOUSEDEV} -t ${MOUSE}
+ eend ${?}
}
stop() {
- ebegin "Stopping gpm"
- start-stop-daemon --stop --quiet --pidfile /var/run/gpm.pid
- eend ${?}
+ ebegin "Stopping gpm"
+ start-stop-daemon --stop --quiet --pidfile /var/run/gpm.pid
+ eend ${?}
}