[patch] rc.d/tmp (silly mkdir usage)

Dario Freni saturnero at freesbie.org
Tue Aug 2 10:53:47 GMT 2005

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 at freesbie.org)
FreeSBIE developer (http://www.freesbie.org)
GPG Public key at http://www.saturnero.net/saturnero.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 186 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20050802/f6e9ab82/signature.bin

More information about the freebsd-hackers mailing list