--- loncom/enrollment/Autoupdate.pl 2007/04/03 17:51:52 1.4 +++ loncom/enrollment/Autoupdate.pl 2007/05/11 17:25:28 1.5 @@ -1,7 +1,7 @@ #!/usr/bin/perl # # Automated Userinfo update script -# $Id: Autoupdate.pl,v 1.4 2007/04/03 17:51:52 raeburn Exp $ +# $Id: Autoupdate.pl,v 1.5 2007/05/11 17:25:28 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -31,12 +31,19 @@ use Apache::lonnet; use Apache::loncommon; use Apache::lonlocal; + use LONCAPA::Configuration; use LONCAPA; + my $perlvarref = LONCAPA::Configuration::read_conf('loncapa.conf'); + my $hostid = $perlvarref->{'lonHostID'}; my @info = ('inststatus','lockedname','lastname','firstname','id'); # find out which users we need to examine my @domains = sort(&Apache::lonnet::current_machine_domains()); foreach my $dom (@domains) { + my $primaryhost_id = &Apache::lonnet::domain($dom,'primary'); + if ($primaryhost_id ne $hostid) { + next; + } my %domconfig = &Apache::lonnet::get_dom('configuration',['autoupdate'], $dom); #only run if configured to