From: ian Date: Sun, 3 Jan 1999 15:52:58 +0000 (+0000) Subject: Fix bugs w/ explicit host spec X-Git-Tag: branchpoint-2001-05-11-withlockex-old~5 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-utils.git;a=commitdiff_plain;h=f872b573622e5c10ed5ca5a73586c2074902061c;ds=sidebyside Fix bugs w/ explicit host spec --- diff --git a/sync-accounts/sync-accounts b/sync-accounts/sync-accounts index 172b78c..637c175 100755 --- a/sync-accounts/sync-accounts +++ b/sync-accounts/sync-accounts @@ -1,11 +1,12 @@ #!/usr/bin/perl -# $Id: sync-accounts,v 1.13 1999-01-03 03:35:24 ian Exp $ +# $Id: sync-accounts,v 1.14 1999-01-03 15:52:58 ian Exp $ # usage: sync-accounts [-n] [-C] [ ...] # options: # -n do not really do anything # -C alternative config file (default is /etc/sync-accounts) # -q display accounts synched, not synched, etc. # if no host(s) specified, does all +# host(s) may not be specified with -q # # The config file consists of directives, one per line. Leading and # trailing whitespace, blank lines and lines starting # are ignored. @@ -198,6 +199,8 @@ while ($ARGV[0] =~ m/^-/) { } } +die "hosts must not be specified with -q\n" if @ARGV && $display; + for $h (@ARGV) { $wanthost{$h}= 1; } open CF,"< $configfile" or die "$configfile: $!"; @@ -362,8 +365,8 @@ sub syncuser ($$) { my ($lu,$ru) = @_; #print STDERR "syncuser($lu,$ru)\n"; - next unless $ch_doinghost; return if $doneuser{$lu}++; + next unless $ch_doinghost; return if !length $ru; fetchown();