83eb2c3700
literal name_enable wherever possible, and ${name}_enable when it's not, to prepare for the demise of set_rcvar(). In cases where I had to hand-edit unusual instances also modify formatting slightly to be more uniform (and in some cases, correct). This includes adding some $FreeBSD$ tags, and most importantly moving rcvar= to right after name= so it's clear that one is derived from the other.
43 lines
835 B
Bash
43 lines
835 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# PROVIDE: cvsyncd
|
|
# REQUIRE: LOGIN
|
|
#
|
|
cvsyncd_enable=${cvsyncd_enable-"NO"}
|
|
cvsyncd_pidfile=${cvsyncd_pidfile-"/var/run/cvsyncd.pid"}
|
|
cvsyncd_conffile=${cvsyncd_conffile-"%%PREFIX%%/etc/cvsyncd.conf"}
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=cvsyncd
|
|
rcvar=cvsyncd_enable
|
|
command=%%PREFIX%%/bin/${name}
|
|
|
|
load_rc_config ${name}
|
|
|
|
case "${cvsyncd_flags}" in
|
|
*-p\ *)
|
|
echo "Warning: \$cvsyncd_flags includes -p option." \
|
|
"Please use \$cvsyncd_pidfile instead."
|
|
;;
|
|
*)
|
|
cvsyncd_flags="-p ${cvsyncd_pidfile} ${cvsyncd_flags}"
|
|
;;
|
|
esac
|
|
|
|
case "${cvsyncd_flags}" in
|
|
*-c\ *)
|
|
echo "Warning: \$cvsyncd_flags includes -c option." \
|
|
"Please use \$cvsyncd_conffile instead."
|
|
;;
|
|
*)
|
|
cvsyncd_flags="-c ${cvsyncd_conffile} ${cvsyncd_flags}"
|
|
;;
|
|
esac
|
|
|
|
pidfile=${cvsyncd_pidfile}
|
|
required_files=${cvsyncd_conffile}
|
|
|
|
run_rc_command "$1"
|