From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 2 10:53:47 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 7D78916A41F for ; Tue, 2 Aug 2005 10:53:47 +0000 (GMT) (envelope-from saturnero@freesbie.org) Received: from jail1-fbsd4.consiagnet.it (jail1-fbsd4.consiagnet.it [83.149.128.151]) by mx1.FreeBSD.org (Postfix) with ESMTP id 07DC643D45 for ; Tue, 2 Aug 2005 10:53:46 +0000 (GMT) (envelope-from saturnero@freesbie.org) Received: from [192.168.0.2] (host46-147.pool8254.interbusiness.it [82.54.147.46]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by jail1-fbsd4.consiagnet.it (Postfix) with ESMTP id D6A7B57EC; Tue, 2 Aug 2005 12:54:02 +0200 (CEST) Message-ID: <42EF5072.30808@freesbie.org> Date: Tue, 02 Aug 2005 12:52:34 +0200 From: Dario Freni User-Agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317) X-Accept-Language: it, it-it, en-us, en MIME-Version: 1.0 To: vd@datamax.bg References: <51934.68.95.232.238.1122957425.squirrel@68.95.232.238> <20050802062937.GA31485@sinanica.bg.datamax> In-Reply-To: <20050802062937.GA31485@sinanica.bg.datamax> X-Enigmail-Version: 0.92.0.0 OpenPGP: url=http://www.saturnero.net/saturnero.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4D0996A22CE2F08BE9C123A5" 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 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 10:53:47 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4D0996A22CE2F08BE9C123A5 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit 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. 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). -- Dario Freni (saturnero@freesbie.org) FreeSBIE developer (http://www.freesbie.org) GPG Public key at http://www.saturnero.net/saturnero.asc --------------enig4D0996A22CE2F08BE9C123A5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFC71B4ymi72IiShysRAn21AKCZupF+JelDzaw8/U9lIcPDwZCUswCeIKZ/ B+ws2afu3CEedeACtqwDuEw= =mY5R -----END PGP SIGNATURE----- --------------enig4D0996A22CE2F08BE9C123A5--