Date: Sun, 18 Nov 2012 21:59:21 +0000 From: Chris Rees <utisoft@gmail.com> To: Ed Schouten <ed@80386.nl> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r243228 - head/etc Message-ID: <CADLo83-RM8dQTQZ7HdQPHvyZ1aHQpqFfGOp6x51-gTtqGL84=g@mail.gmail.com> In-Reply-To: <CAJOYFBBWmm_eoS9qOYMxigtS%2BSjafXXVeT_BmgdWFgEF69j%2BNw@mail.gmail.com> References: <201211181421.qAIEL5KT042019@svn.freebsd.org> <CAJOYFBBWmm_eoS9qOYMxigtS%2BSjafXXVeT_BmgdWFgEF69j%2BNw@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
On 18 Nov 2012 20:39, "Ed Schouten" <ed@80386.nl> wrote:
>
> Hi Chris,
>
> 2012/11/18 Chris Rees <crees@freebsd.org>:
> > Modified: head/etc/rc.initdiskless
> >
==============================================================================
> > --- head/etc/rc.initdiskless Sun Nov 18 14:05:28 2012
(r243227)
> > +++ head/etc/rc.initdiskless Sun Nov 18 14:21:05 2012
(r243228)
> > @@ -354,7 +354,7 @@ for i in ${templates} ; do
> > subdir=${j##*/}
> > if [ -d $j -a ! -f $j.cpio.gz ]; then
> > create_md $subdir
> > - cp -Rp $j/ /$subdir
> > + (cd $j && pax -rw . /$subdir)
> > fi
> > done
> > for j in /conf/$i/*.cpio.gz ; do
>
> Are you sure that this bug wasn't already fixed? The original version
> of the code in the bug report used the following line:
>
> - cp -Rp $j/* /$subdir
>
> The old version of the code you changed didn't have this asterisk,
> meaning dotfiles would already be copied. Still, you could argue that
> your version is nicer, as our behaviour of cp with the trailing slash
> contradicts POSIX.
>
You are correct, and the second to point it out :)
As you say however, pax is technically how it should be done anyway, and
has the nice effect of also preserving hard links. If no-one objects I
think it should stay in.
This is unfortunately another example of many in rc of where something was
fixed ages ago and no-one checked GNATS :( Of course, this is still my
fault.
Chris
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo83-RM8dQTQZ7HdQPHvyZ1aHQpqFfGOp6x51-gTtqGL84=g>
