Wednesday, May 31, 2017

Re: siteXX.tgz with /home/user/.ssh/authorized_keys results in empty file

> >How about not overwriting already existing files?
> >
> >Index: install.sub
> >===================================================================
> >RCS file: /var/cvs/src/distrib/miniroot/install.sub,v
> >retrieving revision 1.1011
> >diff -u -p -r1.1011 install.sub
> >--- install.sub 28 May 2017 09:24:56 -0000 1.1011
> >+++ install.sub 30 May 2017 00:18:16 -0000
> >@@ -2919,7 +2919,7 @@ do_install(){
> >
> > _home=/mnt$_home
> > mkdir -p $_home
> >- (cd /mnt/etc/skel; cp -pR . $_home)
> >+ (cd /mnt/etc/skel; pax -rw -k -pe . $_home)
>
> If that's what it does, I'm all for it.

It is: -rw is copy mode, -k keeps existing files, -pe preserves owners,
permissions, times, etc like cp -p.

I committed the diff, so it should be fixed in the next snapshot.

No comments:

Post a Comment