From: ian Date: Sun, 3 Jan 1999 02:19:27 +0000 (+0000) Subject: Really keep perms. X-Git-Tag: branchpoint-2001-05-11-withlockex-old~9 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=commitdiff_plain;h=ef5b99ae5d00d8695dcaa696101da7a0e7a81103 Really keep perms. --- diff --git a/sync-accounts/sync-accounts b/sync-accounts/sync-accounts index 1f48714..1cbb452 100755 --- a/sync-accounts/sync-accounts +++ b/sync-accounts/sync-accounts @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: sync-accounts,v 1.10 1999-01-03 02:16:49 ian Exp $ +# $Id: sync-accounts,v 1.11 1999-01-03 02:19:27 ian Exp $ # usage: sync-accounts [-n] [-C] [ ...] # options: # -n do not really do anything @@ -547,7 +547,7 @@ sub finish () { close NF or die $!; system "diff -U0 /etc/$file $newfile"; $?==256 or die $?; if (!$no_act) { - (@stats= stat $file) or die "$file: $!"; + (@stats= stat "/etc/$file") or die "$file: $!"; chown $stats[4],$stats[5], $newfile or die $!; chmod $stats[2] & 07777, $newfile or die $!; rename $newfile, "/etc/$file" or die $!;