From f872b573622e5c10ed5ca5a73586c2074902061c Mon Sep 17 00:00:00 2001 From: ian Date: Sun, 3 Jan 1999 15:52:58 +0000 Subject: [PATCH] Fix bugs w/ explicit host spec --- sync-accounts/sync-accounts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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(); -- 2.30.2