aboutsummaryrefslogtreecommitdiff
path: root/libexec/rc/rc.d/moused
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/rc/rc.d/moused')
-rwxr-xr-xlibexec/rc/rc.d/moused7
1 files changed, 5 insertions, 2 deletions
diff --git a/libexec/rc/rc.d/moused b/libexec/rc/rc.d/moused
index aaf0dd0890a8..64e4f815eea9 100755
--- a/libexec/rc/rc.d/moused
+++ b/libexec/rc/rc.d/moused
@@ -16,6 +16,7 @@ start_cmd="moused_start"
pidprefix="/var/run/moused"
pidfile="${pidprefix}.pid"
pidarg=
+typearg=
load_rc_config $name
# doesn't make sense to run in a svcj: nojail keyword
@@ -49,15 +50,17 @@ moused_start()
eval myflags=\${moused_${ms}_flags-$moused_flags}
eval myport=\${moused_${ms}_port-/dev/$ms}
eval mytype=\${moused_${ms}_type-$moused_type}
+ if [ -n "$mytype" ] && check_kern_features evdev_support; then
+ typearg="-t ${mytype}"
+ fi
else
ms="default"
myflags="$moused_flags"
myport="$moused_port"
- mytype="$moused_type"
fi
startmsg -n "Starting ${ms} moused"
- /usr/sbin/moused ${myflags} -p ${myport} -t ${mytype} ${pidarg}
+ /usr/sbin/moused ${myflags} -p ${myport} ${typearg} ${pidarg}
startmsg '.'
mousechar_arg=