diff options
author | jlam <jlam> | 2002-08-07 07:43:32 +0000 |
---|---|---|
committer | jlam <jlam> | 2002-08-07 07:43:32 +0000 |
commit | b0790cc85d776a1bfd80d2ae060f0df48cb8db9d (patch) | |
tree | 08b0be03474e78d2b2a488e632d6dc0475630678 | |
parent | 1af96a13cf534a4cea58bab7a1017165544ee674 (diff) | |
download | pkgsrc-b0790cc85d776a1bfd80d2ae060f0df48cb8db9d.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.
-rw-r--r-- | inputmethod/canna-lib/files/canna | 34 |
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 |