From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 27 12:26:30 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AC7A1065694 for ; Mon, 27 Sep 2010 12:26:30 +0000 (UTC) (envelope-from lars@e.0x20.net) Received: from mail.0x20.net (mail.0x20.net [217.69.67.217]) by mx1.freebsd.org (Postfix) with ESMTP id 1EC828FC2D for ; Mon, 27 Sep 2010 12:26:29 +0000 (UTC) Received: by mail.0x20.net (Postfix, from userid 1002) id 4A4EF3A581; Mon, 27 Sep 2010 14:01:29 +0200 (CEST) Date: Mon, 27 Sep 2010 14:01:29 +0200 From: Lars Engels To: Dmitry Banshchikov Message-ID: <20100927120129.GF95673@e.0x20.net> References: <20100927150421.260874f0@amnesiac.pht> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ylS2wUBXLOxYXZFQ" Content-Disposition: inline In-Reply-To: <20100927150421.260874f0@amnesiac.pht> X-Editor: VIM - Vi IMproved 7.2 X-Operation-System: FreeBSD 5.5-RELEASE-p19 User-Agent: Mutt/1.5.20 (2009-06-14) X-Mailman-Approved-At: Mon, 27 Sep 2010 12:58:02 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: little mistake in rc.subr? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2010 12:26:30 -0000 --ylS2wUBXLOxYXZFQ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 27, 2010 at 03:04:21PM +0400, Dmitry Banshchikov wrote: > Hello, >=20 > In /etc/rc.subr, at line 231, there is: >=20 > if [ ! -f $_pidfile ]; then > debug "pid file ($_pidfile): not readable." > return > fi >=20 > 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. --ylS2wUBXLOxYXZFQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkygh5kACgkQKc512sD3afi4sQCgmxlKG3nCWUc696Z9j8vEdJqR 6vcAn3ycCyEtWPX6t2OFNJOvaIeJNsr3 =G5Zo -----END PGP SIGNATURE----- --ylS2wUBXLOxYXZFQ--