Solve the problem mentioned in the PR a slightly different way. Assign

default values to variables before they are used to make a better
(and working!) example. While I'm hear, switch to $name_pidfile to
make it more clear how one might go about adding that type of variable
to a script.

PR:		docs/93621
Submitted by:	NIIMI Satoshi <sa2c@sa2c.net>
This commit is contained in:
Doug Barton 2006-05-18 05:05:30 +00:00
parent 6a1e0cd365
commit 48173bd362
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=27872

View file

@ -6047,14 +6047,14 @@ USE_SDL+= mixer
name="doormand"
rcvar=${name}_enable
command=%%PREFIX%%/sbin/doormand
command_args="-p $pidfile -f $doormand_config"
pidfile=/var/run/doormand.pid
load_rc_config $name
: ${doormand_enable="NO"}
: ${doormand_config="%%PREFIX%%/etc/doormand/doormand.cf"}
: ${doormand_pidfile=/var/run/doormand.pid}
command=%%PREFIX%%/sbin/doormand
command_args="-p $doormand_pidfile -f $doormand_config"
run_rc_command "$1"</programlisting>