--- /dev/null
+#!/usr/bin/perl
+
+print <<END or die $!;
+Content-Type: text/html
+
+<head>
+<title>chiark public CVS</title>
+<link rev="made" href="mailto:webmaster\@chiark.greenend.org.uk">
+</head>
+<body>
+<h1>list of users exporting CVS repositories via cvsweb from chiark</h1>
+<ul>
+END
+
+open UL, "/etc/userlist" or die $!;
+while (<UL>) {
+ next if m/^\#/ or !m/\S/;
+ chomp($user= $_);
+ next unless readlink "/home/$user/public-cgi/cvsweb"
+ eq '/usr/local/lib/cvsweb';
+ $hd= 0;
+ $pc= "/home/$user/public-CVS/";
+ next unless opendir D, $pc;
+ while (defined($mod= readdir D)) {
+ next unless -d "$pc/$mod";
+ next if $mod =~ m/^\./;
+ if (!$hd) {
+ print "<li><A href=\"/ucgi/~$user/cvsweb\">$user</A>" or die $!;
+ print " (<A href=\"/~$user/\">homepage</A>)" or die $!
+ if -d "/home/$user/public-html";
+ print ":" or die $!;
+ $hd= 1;
+ } else {
+ print "," or die $!;
+ }
+ print " <A href=\"/ucgi/~$user/cvsweb/$mod/\">$mod</A>" or die $!;
+ }
+ next unless $hd;
+ print "</li>\n" or die $!;
+}
+
+close UL or die $!;
+
+print <<END or die $!;
+</ul>
+<hr>
+<ADDRESS>
+ maintained by
+ <A HREF="mailto:$ENV{SERVER_ADMIN}">$ENV{SERVER_ADMIN}</A>;
+ <A href="/">chiark home page</A>
+</ADDRESS>
+</body>
+END
+
+exit 0