A list of FreeBSD Homepages (http://www.freebsd.org/~[a-z]*)

This commit is contained in:
Wolfram Schneider 1998-07-31 09:45:51 +00:00
parent 83a64e4400
commit 7cec26ba4e
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=3228
6 changed files with 150 additions and 2 deletions

View file

@ -1,5 +1,11 @@
# $Id: Makefile,v 1.1 1998-07-31 09:18:25 wosch Exp $
# $Id: Makefile,v 1.2 1998-07-31 09:45:51 wosch Exp $
DOCS= photos.sgml
homepage.inc:
perl homepage.pl > ${.TARGET}
homepage.sgml: homepage.inc
CLEANFILES+= homepage.inc
.include "../web.mk"

50
data/internal/homepage.pl Normal file
View file

@ -0,0 +1,50 @@
#!/usr/bin/perl
$passwd = '/etc/passwd';
$homepagedir = 'public_html';
@index = ('index.html', 'index.cgi');
$noindex = '.noindex';
open(P, $passwd) || die "open $passwd: $!\n";
undef @pages;
while(<P>) {
($login,$passwd,$uid,$gid,$gcos,$home,$shell) = split(/:/);
# cleanup gecos
$gcos =~ s/,+$//;
# disable daemons
next if $uid <= 100;
next if $login eq 'nobody';
next if $shell =~ ~ m%/(pppd|sliplogin|nologin|nonexistent)$%;
# uucp accounts
next if $login =~ /^U/;
$p = $home . '/' . $homepagedir;
# user don't want be on the index
next if -f "$p/$noindex";
foreach (@index) {
if (-f "$p/$_" && -r "$p/$_") {
if ($_ !~ /\.cgi$/ || -x "$p/$_") {
push(@pages, $gcos . ':' . $login);
last;
}
}
}
}
close P;
if ($#pages < 0) {
die "No users found!\n";
}
foreach (sort @pages) {
($gcos, $login) = split(/:/);
($firstgecos, @gecos) = split(/,/, $gcos);
print qq{<LI><A HREF="http://www.freebsd.org/~$login/">},
$firstgecos, "</A> ", join(', ', @gecos), "</LI>\n";
}

View file

@ -0,0 +1,18 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" [
<!ENTITY date "$Date: 1998-07-31 09:45:51 $">
<!ENTITY title "FreeBSD Homepages">
<!ENTITY % includes SYSTEM "../includes.sgml"> %includes;
<!ENTITY homepage SYSTEM "homepage.inc">
]>
<!-- $Id: homepage.sgml,v 1.1 1998-07-31 09:45:51 wosch Exp $ -->
<html>
&header;
<ol>
&homepage;
</ol>
&footer;
</body>
</html>

View file

@ -1,5 +1,11 @@
# $Id: Makefile,v 1.1 1998-07-31 09:18:25 wosch Exp $
# $Id: Makefile,v 1.2 1998-07-31 09:45:51 wosch Exp $
DOCS= photos.sgml
homepage.inc:
perl homepage.pl > ${.TARGET}
homepage.sgml: homepage.inc
CLEANFILES+= homepage.inc
.include "../web.mk"

50
en/internal/homepage.pl Normal file
View file

@ -0,0 +1,50 @@
#!/usr/bin/perl
$passwd = '/etc/passwd';
$homepagedir = 'public_html';
@index = ('index.html', 'index.cgi');
$noindex = '.noindex';
open(P, $passwd) || die "open $passwd: $!\n";
undef @pages;
while(<P>) {
($login,$passwd,$uid,$gid,$gcos,$home,$shell) = split(/:/);
# cleanup gecos
$gcos =~ s/,+$//;
# disable daemons
next if $uid <= 100;
next if $login eq 'nobody';
next if $shell =~ ~ m%/(pppd|sliplogin|nologin|nonexistent)$%;
# uucp accounts
next if $login =~ /^U/;
$p = $home . '/' . $homepagedir;
# user don't want be on the index
next if -f "$p/$noindex";
foreach (@index) {
if (-f "$p/$_" && -r "$p/$_") {
if ($_ !~ /\.cgi$/ || -x "$p/$_") {
push(@pages, $gcos . ':' . $login);
last;
}
}
}
}
close P;
if ($#pages < 0) {
die "No users found!\n";
}
foreach (sort @pages) {
($gcos, $login) = split(/:/);
($firstgecos, @gecos) = split(/,/, $gcos);
print qq{<LI><A HREF="http://www.freebsd.org/~$login/">},
$firstgecos, "</A> ", join(', ', @gecos), "</LI>\n";
}

18
en/internal/homepage.sgml Normal file
View file

@ -0,0 +1,18 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" [
<!ENTITY date "$Date: 1998-07-31 09:45:51 $">
<!ENTITY title "FreeBSD Homepages">
<!ENTITY % includes SYSTEM "../includes.sgml"> %includes;
<!ENTITY homepage SYSTEM "homepage.inc">
]>
<!-- $Id: homepage.sgml,v 1.1 1998-07-31 09:45:51 wosch Exp $ -->
<html>
&header;
<ol>
&homepage;
</ol>
&footer;
</body>
</html>