moused (158692) | moused (165664) |
---|---|
1#!/bin/sh 2# 3# $NetBSD: moused,v 1.1 2001/10/29 23:25:01 augustss Exp $ | 1#!/bin/sh 2# 3# $NetBSD: moused,v 1.1 2001/10/29 23:25:01 augustss Exp $ |
4# $FreeBSD: head/etc/rc.d/moused 158692 2006-05-17 11:37:09Z matteo $ | 4# $FreeBSD: head/etc/rc.d/moused 165664 2006-12-30 22:53:20Z yar $ |
5# 6 7# PROVIDE: moused 8# REQUIRE: DAEMON cleanvar 9# KEYWORD: nojail 10 11. /etc/rc.subr 12 13name=moused 14rcvar=`set_rcvar` 15command="/usr/sbin/${name}" 16start_cmd="moused_start" | 5# 6 7# PROVIDE: moused 8# REQUIRE: DAEMON cleanvar 9# KEYWORD: nojail 10 11. /etc/rc.subr 12 13name=moused 14rcvar=`set_rcvar` 15command="/usr/sbin/${name}" 16start_cmd="moused_start" |
17_pidprefix="/var/run/moused" 18pidfile="${_pidprefix}.pid" 19_pidarg= | 17pidprefix="/var/run/moused" 18pidfile="${pidprefix}.pid" 19pidarg= |
20load_rc_config $name 21 22# Set the pid file and variable name. The second argument, if it exists, is 23# expected to be the mouse device. 24# 25if [ -n "$2" ]; then 26 eval moused_$2_enable=\${moused_$2_enable-${moused_nondefault_enable}} 27 rcvar=`set_rcvar moused_$2` | 20load_rc_config $name 21 22# Set the pid file and variable name. The second argument, if it exists, is 23# expected to be the mouse device. 24# 25if [ -n "$2" ]; then 26 eval moused_$2_enable=\${moused_$2_enable-${moused_nondefault_enable}} 27 rcvar=`set_rcvar moused_$2` |
28 pidfile="${_pidprefix}.$2.pid" 29 _pidarg="-I $pidfile" | 28 pidfile="${pidprefix}.$2.pid" 29 pidarg="-I $pidfile" |
30fi 31 32moused_start() 33{ 34 local ms myflags myport mytype 35 36 # Set the mouse device and get any related variables. If 37 # a moused device has been specified on the commandline, then --- 10 unchanged lines hidden (view full) --- 48 else 49 ms="default" 50 myflags="$moused_flags" 51 myport="$moused_port" 52 mytype="$moused_type" 53 fi 54 55 echo -n "Starting ${ms} moused:" | 30fi 31 32moused_start() 33{ 34 local ms myflags myport mytype 35 36 # Set the mouse device and get any related variables. If 37 # a moused device has been specified on the commandline, then --- 10 unchanged lines hidden (view full) --- 48 else 49 ms="default" 50 myflags="$moused_flags" 51 myport="$moused_port" 52 mytype="$moused_type" 53 fi 54 55 echo -n "Starting ${ms} moused:" |
56 /usr/sbin/moused ${myflags} -p ${myport} -t ${mytype} ${_pidarg} | 56 /usr/sbin/moused ${myflags} -p ${myport} -t ${mytype} ${pidarg} |
57 | 57 |
58 _mousechar_arg= | 58 mousechar_arg= |
59 case ${mousechar_start} in 60 [Nn][Oo] | '') 61 ;; 62 *) 63 echo -n ' mousechar_start' | 59 case ${mousechar_start} in 60 [Nn][Oo] | '') 61 ;; 62 *) 63 echo -n ' mousechar_start' |
64 _mousechar_arg="-M ${mousechar_start}" | 64 mousechar_arg="-M ${mousechar_start}" |
65 ;; 66 esac 67 68 for ttyv in /dev/ttyv* ; do | 65 ;; 66 esac 67 68 for ttyv in /dev/ttyv* ; do |
69 vidcontrol < ${ttyv} ${_mousechar_arg} -m on | 69 vidcontrol < ${ttyv} ${mousechar_arg} -m on |
70 done 71 echo '.' 72} 73 74run_rc_command $* | 70 done 71 echo '.' 72} 73 74run_rc_command $* |