[Fai-commit] r3051 - people/michael/bugfixes/283475/scripts

fai-repository at svn.debian.org fai-repository at svn.debian.org
Fri Nov 11 16:04:50 UTC 2005


Author: michael-guest
Date: 2005-11-11 16:04:50 +0000 (Fri, 11 Nov 2005)
New Revision: 3051

Modified:
   people/michael/bugfixes/283475/scripts/fcopy
Log:
fix for 283472, just as posted to the Debian BTS and reported to work properly


Modified: people/michael/bugfixes/283475/scripts/fcopy
===================================================================
--- people/michael/bugfixes/283475/scripts/fcopy	2005-11-11 15:56:01 UTC (rev 3050)
+++ people/michael/bugfixes/283475/scripts/fcopy	2005-11-11 16:04:50 UTC (rev 3051)
@@ -178,8 +178,8 @@
 
   # convert names to numeric uid, gid
   my ($user,$group) = @_;
-  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'`;
   warn "name2id $user = $uid ; $group = $gid\n" if $debug;
   return ($uid,$gid);
 }




More information about the Fai-commit mailing list