little mistake in rc.subr?

Lars Engels lars.engels at 0x20.net
Mon Sep 27 12:26:30 UTC 2010


On Mon, Sep 27, 2010 at 03:04:21PM +0400, Dmitry Banshchikov wrote:
> Hello,
> 
> In /etc/rc.subr, at line 231, there is:
> 
> if [ ! -f $_pidfile ]; then
> debug "pid file ($_pidfile): not readable."
>     return
> fi
> 
> Is check "[ ! -r $_pidfile ]" more correct?

There's pratically no difference. rc stuff is run as root, so if there's
a file, it's readable, if there's no file, then the debug message is
printed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20100927/58c597ba/attachment.pgp


More information about the freebsd-hackers mailing list