From owner-freebsd-questions@FreeBSD.ORG Sat Aug 21 23:37:06 2010 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 2D74B1065673 for ; Sat, 21 Aug 2010 23:37:06 +0000 (UTC) (envelope-from freebsd-questions@pp.dyndns.biz) Received: from smtprelay-h22.telenor.se (smtprelay-h22.telenor.se [195.54.99.197]) by mx1.freebsd.org (Postfix) with ESMTP id D9C8F8FC17 for ; Sat, 21 Aug 2010 23:37:05 +0000 (UTC) Received: from ipb4.telenor.se (ipb4.telenor.se [195.54.127.167]) by smtprelay-h22.telenor.se (Postfix) with ESMTP id 7B9B7E9DD9 for ; Sun, 22 Aug 2010 01:37:04 +0200 (CEST) X-SENDER-IP: [85.226.59.55] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Amk3AHIAcExV4js3PGdsb2JhbACHaYs2jRQMAQEBATUtuieDCAGCLgQ X-IronPort-AV: E=Sophos;i="4.56,248,1280700000"; d="scan'208";a="1662719646" Received: from c-373be255.107-1-64736c10.cust.bredbandsbolaget.se (HELO gatekeeper.pp.dyndns.biz) ([85.226.59.55]) by ipb4.telenor.se with ESMTP; 22 Aug 2010 01:37:03 +0200 Received: from [192.168.69.67] (phobos [192.168.69.67]) by gatekeeper.pp.dyndns.biz (8.14.4/8.14.4) with ESMTP id o7LNb2uK086363 for ; Sun, 22 Aug 2010 01:37:02 +0200 (CEST) (envelope-from freebsd-questions@pp.dyndns.biz) Message-ID: <4C70631E.7020902@pp.dyndns.biz> Date: Sun, 22 Aug 2010 01:37:02 +0200 From: =?ISO-8859-1?Q?Morgan_Wesstr=F6m?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100727 Lightning/1.0b2 Thunderbird/3.1.1 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <4C705A07.5000007@pp.dyndns.biz> In-Reply-To: <4C705A07.5000007@pp.dyndns.biz> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: Pidfile ends up in /tmp instead of /var/run 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: Sat, 21 Aug 2010 23:37:06 -0000 On 2010-08-22 00:58, Morgan Wesström wrote: > I'm trying to create an rc script for the first time following the guide > in the handbook. The script works as expected except for the pidfile > which is created in /tmp for some reason I can't figure out. The daemon > I try to run is a Linux program if that matters. Any help to solve this > would be appreciated. Here's the rc script: > > > #!/bin/sh > > # PROVIDE: linuxdaemon > # REQUIRE: NETWORKING DAEMON > # BEFORE: LOGIN > # KEYWORD: shutdown > > linuxdaemon_enable="${linuxdaemon_enable-NO}" > > . /etc/rc.subr > > name="linuxdaemon" > rcvar=`set_rcvar` > command="/usr/local/bin/linuxdaemon" > command_args="-c /usr/local/etc/linuxdaemon.conf > /dev/null 2>&1" > > load_rc_config $name > > pidfile="/var/run/linuxdaemon.pid" > required_files="/usr/local/etc/linuxdaemon.conf" > > run_rc_command "$1" > Some additional info. Creating /compat/linux/tmp makes the pidfile move there instead when I start the service. Creating /compat/linux/var/run does _not_ make the pidfile appear there. I though for a brief moment that I had to symlink /compat/linux/var/run to /var/run but that seems to be the wrong solution. Still interested in some pointers while I continue trying to solve this... /Morgan