Skip site navigation (1)Skip section navigation (2)
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

--hFEw+uh9kF5V6COn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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
> > +>=20
> > +>   FreeBSD src repository
> > +>=20
> > +>   Modified files:
> > +>     etc/rc.d             var=20
> > +>   Log:
> > +>   - Remove the dependency of /usr/bin/touch by using "cp /dev/null <=
target>"
> > +>     to create /var/log/lastlog.
> >=20
> > Isn't 'echo -n > <target>' a better choice?
>=20
> 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
--=20
Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former.			  -- Einstein (attrib.)

--hFEw+uh9kF5V6COn
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)

iD8DBQFCJPYQocfcwTS3JF8RAkoiAKC5oxNzgXmsOMnnADXcnWZyMeIqsQCgrdqa
ZCjZq79Z45NzAwKhzjUWeBE=
=XPUh
-----END PGP SIGNATURE-----

--hFEw+uh9kF5V6COn--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050301230904.GQ3322>