[Fai-commit] r4477 - trunk/bin
lange at alioth.debian.org
lange at alioth.debian.org
Sun Aug 5 15:28:36 UTC 2007
Author: lange
Date: 2007-08-05 15:28:36 +0000 (Sun, 05 Aug 2007)
New Revision: 4477
Modified:
trunk/bin/fcopy
Log:
skip comment lines in file-modes, add quotes to variable (closes: #430127)
Modified: trunk/bin/fcopy
===================================================================
--- trunk/bin/fcopy 2007-08-05 15:11:47 UTC (rev 4476)
+++ trunk/bin/fcopy 2007-08-05 15:28:36 UTC (rev 4477)
@@ -27,7 +27,7 @@
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#*********************************************************************
-my $version = "Version 2.2.12, 5-august-2007";
+my $version = "Version 2.2.13, 5-august-2007";
use strict;
use File::Copy;
@@ -240,10 +240,10 @@
}
else
{
- $uid = ($user =~ /^\d+$/) ? $user : `$ENV{ROOTCMD} perl -e '\$uid = getpwnam $user; print \$uid'`;
- $gid = ($group =~ /^\d+$/) ? $group : `$ENV{ROOTCMD} perl -e '\$gid = getgrnam $group; print \$gid'`;
+ $uid = ($user =~ /^\d+$/) ? $user : `$ENV{ROOTCMD} perl -e '\$uid = getpwnam "$user"; print \$uid'`;
+ $gid = ($group =~ /^\d+$/) ? $group : `$ENV{ROOTCMD} perl -e '\$gid = getgrnam "$group"; print \$gid'`;
}
- warn "name2id $user = $uid ; $group = $gid\n" if $debug;
+ warn "name2num $user = $uid ; $group = $gid\n" if $debug;
return ($uid,$gid);
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -296,6 +296,8 @@
while (<MODEFILE>) {
# skip empty lines
next if /^\s*$/;
+ # skip comment lines
+ next if /^#/;
($owner,$group,$mode,$fclass) = split;
$mode = oct($mode);
# class found
More information about the Fai-commit
mailing list