From 4e5ee22bd0402ce73a7486ff02751e00ed71a6c0 Mon Sep 17 00:00:00 2001
From: Doug Barton <dougb@FreeBSD.org>
Date: Sat, 20 May 2006 06:45:17 +0000
Subject: [PATCH] Argh. I forgot that "$pidfile" has a special meaning to
 rc.subr, so fix the error introduced in the last revision. Generalize this,
 and command to make the sample code more reusable.

---
 en_US.ISO8859-1/books/porters-handbook/book.sgml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/en_US.ISO8859-1/books/porters-handbook/book.sgml b/en_US.ISO8859-1/books/porters-handbook/book.sgml
index b4752a8b14..5e67a0f99f 100644
--- a/en_US.ISO8859-1/books/porters-handbook/book.sgml
+++ b/en_US.ISO8859-1/books/porters-handbook/book.sgml
@@ -6047,14 +6047,15 @@ USE_SDL+=   mixer
 name="doormand"
 rcvar=${name}_enable
 
+command=%%PREFIX%%/sbin/${name}
+pidfile=/var/run/${name}.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"
+command_args="-p $pidfile -f $doormand_config"
 
 run_rc_command "$1"</programlisting>