diff options
author | Doug Barton <dougb@FreeBSD.org> | 2012-08-05 20:46:40 +0000 |
---|---|---|
committer | Doug Barton <dougb@FreeBSD.org> | 2012-08-05 20:46:40 +0000 |
commit | 6662c6791c6dd1957de00e402045b82a0aad76d5 (patch) | |
tree | 1734810f8ca3ff0fae4f04b0c8fa0afb97acd2a3 | |
parent | 0174faf428c02295e938b09551461c5ae16b2278 (diff) |
Notes
-rw-r--r-- | devel/linux-js/Makefile | 2 | ||||
-rw-r--r-- | devel/linux-js/files/jscal.in (renamed from devel/linux-js/files/jscal.sh.in) | 17 | ||||
-rw-r--r-- | devel/linux-js/files/linux_js.in (renamed from devel/linux-js/files/linux_js.sh.in) | 22 |
3 files changed, 21 insertions, 20 deletions
diff --git a/devel/linux-js/Makefile b/devel/linux-js/Makefile index 45595e1aa9e0..99943689e97c 100644 --- a/devel/linux-js/Makefile +++ b/devel/linux-js/Makefile @@ -19,7 +19,7 @@ PROGRAMS= jscal jstest MAN1= ${PROGRAMS:S|$|.1|} MAN4= linux_js.4 PORTDOCS= joystick-api.txt -USE_RCORDER= jscal.sh linux_js.sh +USE_RC_SUBR= jscal linux_js OPTIONS_DEFINE= LINUX JOY UHID DOCS OPTIONS_DEFAULT= LINUX JOY UHID diff --git a/devel/linux-js/files/jscal.sh.in b/devel/linux-js/files/jscal.in index 1553dacf9db7..715d3c6db197 100644 --- a/devel/linux-js/files/jscal.sh.in +++ b/devel/linux-js/files/jscal.in @@ -1,18 +1,22 @@ #!/bin/sh -# $FreeBSD$ +# $FreeBSD$ +# # PROVIDE: jscal # REQUIRE: linux_js # KEYWORD: shutdown -jscal_enable=${jscal_enable-"NO"} -jscal_devices="${jscal_devices:-/dev/input/js*}" -jscal_state="${jscal_state:-/var/db/jscal-state}" - . /etc/rc.subr -name="jscal" +name=jscal rcvar=jscal_enable + +load_rc_config $name + +jscal_enable=${jscal_enable:-"NO"} +jscal_devices="${jscal_devices:-/dev/input/js*}" +jscal_state="${jscal_state:-/var/db/jscal-state}" + command="%%PREFIX%%/bin/jscal" start_cmd="jscal_start" stop_cmd="jscal_stop" @@ -38,5 +42,4 @@ jscal_stop() done } -load_rc_config $name run_rc_command "$1" diff --git a/devel/linux-js/files/linux_js.sh.in b/devel/linux-js/files/linux_js.in index 14b61dc761c2..b8642becf2a9 100644 --- a/devel/linux-js/files/linux_js.sh.in +++ b/devel/linux-js/files/linux_js.in @@ -1,23 +1,22 @@ #!/bin/sh -# $FreeBSD$ +# $FreeBSD$ +# # PROVIDE: linux_js +# REQUIRE: LOGIN # KEYWORD: shutdown -linux_js_enable=${linux_js_enable-"NO"} - . /etc/rc.subr -name="linux_js" +name=linux_js rcvar=linux_js_enable -start_cmd="linux_js_start" -stop_cmd="linux_js_stop" -linux_js_start() -{ - echo "Starting ${name}." - kldload linux_js -} +load_rc_config $name + +linux_js_enable=${linux_js_enable:-"NO"} + +start_cmd="load_kld -m linux_js" +stop_cmd="linux_js_stop" linux_js_stop() { @@ -25,5 +24,4 @@ linux_js_stop() kldunload linux_js } -load_rc_config $name run_rc_command "$1" |