Date: Tue, 02 Aug 2005 12:52:34 +0200 From: Dario Freni <saturnero@freesbie.org> To: vd@datamax.bg Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] rc.d/tmp (silly mkdir usage) Message-ID: <42EF5072.30808@freesbie.org> In-Reply-To: <20050802062937.GA31485@sinanica.bg.datamax> References: <51934.68.95.232.238.1122957425.squirrel@68.95.232.238> <20050802062937.GA31485@sinanica.bg.datamax>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] 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 [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFC71B4ymi72IiShysRAn21AKCZupF+JelDzaw8/U9lIcPDwZCUswCeIKZ/ B+ws2afu3CEedeACtqwDuEw= =mY5R -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42EF5072.30808>
