fai: fcopy does not resolve uid/gid

Steffen Grunewald steffen.grunewald at aei.mpg.de
Tue May 24 09:24:22 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?

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

Cheers,
 Steffen



More information about the linux-fai mailing list