Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 May 2016 14:27:24 +0100
From:      RW <rwmaillists@googlemail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Pidfile generated by /usr/sbin/daemon not usable by rc.d script
Message-ID:  <20160525142724.7ccadc4e@gumby.homeunix.com>
In-Reply-To: <20160525141347.7e82622e@gumby.homeunix.com>
References:  <1249E74D-FB34-4FF3-B670-38D80B1B07AF@wooga.net> <20160525141347.7e82622e@gumby.homeunix.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Wed, 25 May 2016 14:13:47 +0100
RW wrote:

> On Wed, 25 May 2016 11:51:31 +0200
> Adam Lindberg wrote:
> 
> > Hi!
> > 
> > I’m trying to create a minimal rc.d script for a service, and
> > discovered that using /usr/sbin/daemon with the -p flag creates a
> > pidfile which is not readable by /etc/rc.subr. The pidfile is
> > created without a newline, in which case all the service commands
> > stop working. That means, running “stop” or “status” prints
> > nothing. If I add a newline to the file after the fact, they all
> > start working again. Running the service script with debug output,
> > shows the ‘read’ builtin halting the execution of the script when
> > trying to read the pidfile.  
> 
> 
> 
> This is strange because powerd.pid works without a newline. 

Actually on closer inspection it appears that rc.d/powerd doesn't
define a pidfile - it's getting shutdown based on the command name. I
think you should submit a PR.  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160525142724.7ccadc4e>