From owner-freebsd-questions@FreeBSD.ORG Mon Oct 8 22:45:25 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B28B16A417 for ; Mon, 8 Oct 2007 22:45:25 +0000 (UTC) (envelope-from sdafreebsduk@rowyerboat.com) Received: from pythagoras.zen.co.uk (pythagoras.zen.co.uk [212.23.3.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0825B13C45D for ; Mon, 8 Oct 2007 22:45:24 +0000 (UTC) (envelope-from sdafreebsduk@rowyerboat.com) Received: from [82.70.166.86] (helo=[192.168.0.200]) by pythagoras.zen.co.uk with esmtp (Exim 4.50) id 1If1Ln-000071-9q for freebsd-questions@freebsd.org; Mon, 08 Oct 2007 22:45:23 +0000 Message-ID: <470AB2FC.8070006@rowyerboat.com> Date: Mon, 08 Oct 2007 23:45:16 +0100 From: Stephen Allen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070326 Thunderbird/2.0.0.0 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: FreeBSD Questions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Originating-Pythagoras-IP: [82.70.166.86] Subject: Question about rc-scripts X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Oct 2007 22:45:25 -0000 Under normal circumstance, should the /etc/rc.subr functions handle the creation of the pid at service start? The basic vendor-provided script (which I've had to adapt somewhat to suit this installation) runs "echo $! > ${dbgw_pidfile}" as the last line of the script. When you do a 'status' command though, it blanks out the contents of the pid. That echo line isn't present in any of the standard scripts - hence my initial question. Apart from variable assignments, the script defines 'start_cmd' (which I assume is used as the start command by rc.subr). Strange that I couldn't find any reference to start_cmd in /etc/rc.subr though. So, my question is, why isn't the pidfile being automagically created? Many thanks, Steve