From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 2 11:06:34 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 245AC16A41F for ; Tue, 2 Aug 2005 11:06:34 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from jengal.datamax.bg (jengal.datamax.bg [82.103.104.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87F1A43D49 for ; Tue, 2 Aug 2005 11:06:33 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from sinanica.bg.datamax (sinanica.bg.datamax [192.168.10.1]) by jengal.datamax.bg (Postfix) with QMQP id D7EDC87C8; Tue, 2 Aug 2005 14:06:32 +0300 (EEST) Received: (nullmailer pid 86039 invoked by uid 1004); Tue, 02 Aug 2005 11:06:32 -0000 Date: Tue, 2 Aug 2005 14:06:32 +0300 From: Vasil Dimov To: Dario Freni Message-ID: <20050802110632.GB85997@sinanica.bg.datamax> References: <51934.68.95.232.238.1122957425.squirrel@68.95.232.238> <20050802062937.GA31485@sinanica.bg.datamax> <42EF5072.30808@freesbie.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="98e8jtXdkpgskNou" Content-Disposition: inline In-Reply-To: <42EF5072.30808@freesbie.org> X-OS: FreeBSD 5.4-STABLE User-Agent: Mutt/1.5.9i Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] rc.d/tmp (silly mkdir usage) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vd@datamax.bg List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2005 11:06:34 -0000 --98e8jtXdkpgskNou Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 02, 2005 at 12:52:34PM +0200, Dario Freni wrote: > Vasil Dimov wrote: > > Even we can use > > if [ -d /tmp -a -w /tmp ] ; then > > or (which is equivalent) > > if [ -d /tmp ] && [ -w /tmp ] ; then > > and save external commands (mkdir) execution and directory > > creation/deletion at all. >=20 > You can't use test -w here. The script is checking if there is a > read-only filesystem. -w checks only the file flags (according to the > man page, at least). >=20 That's correct, -w cannot be used to check read-only filesystem. --98e8jtXdkpgskNou Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iD8DBQFC71O2Fw6SP/bBpCARAmMsAKCWFSotlWmFAkqVHEnpmNc2B7L0NwCg3MhS Lxa/W9wvbHrATsKBceCQ67Q= =zFSX -----END PGP SIGNATURE----- --98e8jtXdkpgskNou--