etc/rc.d/{var,tmp} and sub-shell usage?!

Craig Boston craig at
Wed May 23 17:36:29 UTC 2007

On Wed, May 23, 2007 at 10:21:23AM -0700, Doug Barton wrote:
> Using 'echo > file' will work just as well, and avoid the cost of invoking 
> ln.

It seems like that could be vulnerable to malicious symbolic links lying
around from the previous boot.  Doing an rm first should work as during
this stage of system startup there shouldn't be any race conditions.

ln has the -h flag to not follow links, so it may be a better option,
especially if you would have to invoke rm anyway.


More information about the freebsd-current mailing list