fai: fcopy does not resolve uid/gid

Michael Tautschnig michael.tautschnig at zt-consulting.com
Tue May 24 09:30:56 CEST 2005


> On Mon, May 23, 2005 at 08:36:40PM +0200, Michael Tautschnig wrote:
> > Hi Steffen,
> > 
> > if you're still interested in that problem - could you give the following patch
> > a try? IMHO the problem is, that logcheck does not exist within your nfsroot, it
> > only exists on the future client. Thus I'd chroot before doing
> > getpwnam/getgrnam.
> > 
> > diff -rN -u old-MT_FAI/scripts/fcopy new-MT_FAI/scripts/fcopy
> [...]
> > -  my $uid = ($user  =~ /^\d+$/) ? $user  : getpwnam $user;
> > -  my $gid = ($group =~ /^\d+$/) ? $group : getgrnam $group;
> > +  my $uid = ($user  =~ /^\d+$/) ? $user  : `$ENV{ROOTCMD} perl -e '\$uid = getpwnam $user; print \$uid'`;
> > +  my $gid = ($group =~ /^\d+$/) ? $group : `$ENV{ROOTCMD} perl -e '\$gid = getgrnam $group; print \$gid'`;
> 
> Will $ROOTCMD be set properly for upgrades?
It's just empty, which should not be a problem (fcopy does not use perl -w, so
not even warnings will be issued).

> 
> I'll try to give it a try... had intended to do a full installation today 
> anyway :-)
>

Thanks!
Michael



More information about the linux-fai mailing list