summaryrefslogtreecommitdiff
path: root/inputmethod/canna-lib
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2002-08-07 07:43:32 +0000
committerjlam <jlam@pkgsrc.org>2002-08-07 07:43:32 +0000
commitc6beaeadc679d6cd518deed583538e3b21b77251 (patch)
tree08b0be03474e78d2b2a488e632d6dc0475630678 /inputmethod/canna-lib
parent32ff560e01af7681ece27a4d1469c3bb0dfada1c (diff)
downloadpkgsrc-c6beaeadc679d6cd518deed583538e3b21b77251.tar.gz
Rewrite canna rc.d script so that it more closely resembles other pkgsrc
rc.d scripts. This should now honor $canna settings in /etc/rc.conf. This addresses pkg/17543 by itojun.
Diffstat (limited to 'inputmethod/canna-lib')
-rw-r--r--inputmethod/canna-lib/files/canna34
1 files changed, 17 insertions, 17 deletions
diff --git a/inputmethod/canna-lib/files/canna b/inputmethod/canna-lib/files/canna
index 3e4d0fc472f..85805426efa 100644
--- a/inputmethod/canna-lib/files/canna
+++ b/inputmethod/canna-lib/files/canna
@@ -1,25 +1,25 @@
#! /bin/sh
#
-# $NetBSD: canna,v 1.2 2002/06/10 09:47:28 sakamoto Exp $
+# $NetBSD: canna,v 1.3 2002/08/07 07:43:32 jlam Exp $
#
# PROVIDE: canna
# REQUIRE: DAEMON
-name="canna"
-command_start="@PREFIX@/sbin/cannaserver"
-pidfile=""
+if [ -f /etc/rc.subr ]
+then
+ . /etc/rc.subr
+fi
-cmd=${1:-start}
+name="canna"
+rcvar=$name
+command="@PREFIX@/sbin/cannaserver"
+stop_cmd="@PREFIX@/bin/cannakill"
-case ${cmd} in
-start)
- if [ -x ${command_start} ]; then
- echo "Starting ${name}."
- ${command_start} >/dev/null 2>&1
- fi
- ;;
-*)
- :
- ;;
-esac
-exit 0
+if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]
+then
+ load_rc_config $name
+ run_rc_command "$1"
+else
+ @ECHO@ -n ' ${name}'
+ ${command} ${canna_flags} ${command_args}
+fi