}
sub canceled {
my $self = shift;
my $watcher = shift;
$self->addempty;
$self->{Canceled} = 1;
$try_later{$self->{Host}} = $self;
$self->{Watcher} = $watcher;
}
} # package
######################################################################
# hostgroups
sub hostgroup_cpan {
qw(ftp.gmd.de
ftp.gwdg.de
ftp.leo.org
ftp.mpi-sb.mpg.de
ftp.rz.ruhr-uni-bochum.de
ftp.uni-erlangen.de
ftp.uni-hamburg.de
ftp.digital.com
ftp.cdrom.com
www.perl.org
www.cpan.org
);
}
sub hostgroup_freebsd {
qw(ftp.cs.tu-berlin.de
ftp.freebsd.org
ftp.freebsd.de
ftp2.freebsd.org
ftp3.freebsd.org
);
}
sub hostgroup_linux {
qw(www.linux.org www.rpmfind.net www.redhat.com
www.suse.de www.mandrake.com);
}
sub hostgroup_search {
qw(www.altavista.com
www.altavista.de
www.yahoo.com
www.infoseek.com
www.hotbot.com
www.lycos.com
www.lycos.de
www.dejanews.com
search.opentext.com
home.netscape.com
webcrawler.com
netguide.de
www.web.de
www.fireball.de
www.hurra.de
suchen.com
mserv.rrzn.uni-hannover.de
);
}
sub hostgroup_default {
(qw(www.altavista.com
www.google.com
www.perl.com
www.linux.org
ftp.perl.org),
['www.sourceforge.net', 'http'],
['www.netscape.com', 'http'],
['www.microsoft.com', 'http'],
['www.freebsd.org', 'http'],
['www.cpan.org', 'http'],
['www.yahoo.com', 'http'],
['www.amazon.com', 'http'],
['www.gnu.org', 'http'],
['ftp.funet.fi', 'http'],
['www.slashdot.org', 'http'],
['www.heise.de', 'http'],
);
}
*hostgroup_normal = *hostgroup_normal = \&hostgroup_default;
######################################################################
# main
my $hostgroup = "normal";
my @addhost;
my $do_ns = 1;
my $hostfile;
my $debug;
my $update = 1;
my $log;
my $logfh;
if (!GetOptions("hosts|hostgroup=s" => \$hostgroup,
"hostfile=s" => \$hostfile,
=2= |