Date: Tue, 1 Mar 2005 23:09:04 +0000 From: Ceri Davies <ceri@submonkey.net> To: Brooks Davis <brooks@one-eyed-alien.net> Cc: src-committers@FreeBSD.org Subject: Re: cvs commit: src/etc/rc.d var Message-ID: <20050301230904.GQ3322@submonkey.net> In-Reply-To: <20050301225947.GA30024@odin.ac.hmc.edu> References: <200503012208.j21M8Fi4002801@repoman.freebsd.org> <20050301224647.GY9291@darkness.comp.waw.pl> <20050301225947.GA30024@odin.ac.hmc.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Tue, Mar 01, 2005 at 02:59:47PM -0800, Brooks Davis wrote: > On Tue, Mar 01, 2005 at 11:46:47PM +0100, Pawel Jakub Dawidek wrote: > > On Tue, Mar 01, 2005 at 10:08:15PM +0000, Brooks Davis wrote: > > +> brooks 2005-03-01 22:08:15 UTC > > +> > > +> FreeBSD src repository > > +> > > +> Modified files: > > +> etc/rc.d var > > +> Log: > > +> - Remove the dependency of /usr/bin/touch by using "cp /dev/null <target>" > > +> to create /var/log/lastlog. > > > > Isn't 'echo -n > <target>' a better choice? > > Perhaps. I copied the example in etc/rc.d/cleanvar (except without the > lack of newlines). Sam suggested the even simpler ">target" which would > also work. I'm assuming you have a /bin since the line after the cp is > chmod so I'm not really worried. echo -n does have the advantage of > being slightly clearer. I'm not sure if this is worth changing or not. The only difference I can see between the two/three is that both "cp /dev/null $foo" and "echo -n > $foo" will truncate a pre-existing file, but in this case even that distinction isn't important. Ceri -- Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. -- Einstein (attrib.) [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCJPYQocfcwTS3JF8RAkoiAKC5oxNzgXmsOMnnADXcnWZyMeIqsQCgrdqa ZCjZq79Z45NzAwKhzjUWeBE= =XPUh -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050301230904.GQ3322>
