#!/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<config-file>] [<host> ...]
# 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.
}
}
+die "hosts must not be specified with -q\n" if @ARGV && $display;
+
for $h (@ARGV) { $wanthost{$h}= 1; }
open CF,"< $configfile" or die "$configfile: $!";
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();