diff options
author | Jean-Yves Lefort <jylefort@FreeBSD.org> | 2006-03-21 16:03:50 +0000 |
---|---|---|
committer | Jean-Yves Lefort <jylefort@FreeBSD.org> | 2006-03-21 16:03:50 +0000 |
commit | cf569742410088cc644b46110fc28567a0cab7fc (patch) | |
tree | f0d22ac874daa63d16340284998343e5fa5448e8 /devel/linux-js/files | |
parent | Add missing perl dep. (diff) |
Version 2.0:
- USB joystick support has been added
- Calling select() with a large timeout did not work properly: fixed
- Short reads (< sizeof(struct js_event)) did not work: fixed
- The JSIOCGCORR/JSCIOCSCORR ioctls now handle all the axes
- Each joystick is now presented as a separate js device
- A manual page has been added
Notes
Notes:
svn path=/head/; revision=157891
Diffstat (limited to 'devel/linux-js/files')
-rw-r--r-- | devel/linux-js/files/jscal.sh.in | 19 | ||||
-rw-r--r-- | devel/linux-js/files/linux_js.sh.in | 29 |
2 files changed, 44 insertions, 4 deletions
diff --git a/devel/linux-js/files/jscal.sh.in b/devel/linux-js/files/jscal.sh.in index ebc4b5d8e77a..d9cf58f5fa4a 100644 --- a/devel/linux-js/files/jscal.sh.in +++ b/devel/linux-js/files/jscal.sh.in @@ -2,10 +2,11 @@ # $FreeBSD$ # PROVIDE: jscal +# REQUIRE: linux_js # KEYWORD: shutdown jscal_enable=${jscal_enable-"NO"} -jscal_device="/dev/input/js0" +jscal_devices="${jscal_devices:-/dev/input/js*}" jscal_state="${jscal_state:-/var/db/jscal-state}" . %%RC_SUBR%% @@ -18,13 +19,23 @@ stop_cmd="jscal_stop" jscal_start() { - [ -f "$jscal_state" ] && . "$jscal_state" 2>/dev/null + echo "Starting ${name}." + for d in $jscal_devices; do + [ "x$d" = "x$jscal_devices" ] && break + statefile="$jscal_state-`basename $d`" + [ -f "$statefile" ] && . "$statefile" 2>/dev/null + done } jscal_stop() { - cal=`"$command" -p "$jscal_device" 2>/dev/null` && \ - echo "$cal" | sed -e "s|^jscal|$command|" > $jscal_state + echo "Stopping ${name}." + for d in $jscal_devices; do + [ "x$d" = "x$jscal_devices" ] && break + statefile="$jscal_state-`basename $d`" + cal=`"$command" -p "$d" 2>/dev/null` && \ + echo "$cal" | sed -e "s|^jscal|$command|" > "$statefile" + done } load_rc_config $name diff --git a/devel/linux-js/files/linux_js.sh.in b/devel/linux-js/files/linux_js.sh.in new file mode 100644 index 000000000000..9768f1b3aa31 --- /dev/null +++ b/devel/linux-js/files/linux_js.sh.in @@ -0,0 +1,29 @@ +#!/bin/sh +# $FreeBSD$ + +# PROVIDE: linux_js +# KEYWORD: shutdown + +linux_js_enable=${linux_js_enable-"NO"} + +. %%RC_SUBR%% + +name="linux_js" +rcvar=`set_rcvar` +start_cmd="linux_js_start" +stop_cmd="linux_js_stop" + +linux_js_start() +{ + echo "Starting ${name}." + kldload linux_js +} + +linux_js_stop() +{ + echo "Stopping ${name}." + kldunload linux_js +} + +load_rc_config $name +run_rc_command "$1" |