- Fix build of cluster-specific file

Approved by:	doceng (implicit)
This commit is contained in:
Gabor Kovesdan 2012-08-20 13:55:48 +00:00
parent 7ba98a21ad
commit b92ed28d92
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/projects/sgml2xml/; revision=39400
4 changed files with 7 additions and 56 deletions

View file

@ -41,10 +41,11 @@ if ($#pages < 0) {
die "No users found!\n";
}
print "<?xml version='1.0' encoding='iso-8859-1'?>\n";
foreach (sort @pages) {
($gcos, $login) = split(/:/);
($firstgecos, @gecos) = split(/,/, $gcos);
print qq{<LI><A HREF="http://people.FreeBSD.org/~$login/">},
$firstgecos, "</A> ", join(', ', @gecos), "</LI>\n";
print qq{<li><a href="http://people.FreeBSD.org/~$login/">},
$firstgecos, "</a> ", join(', ', @gecos), "</li>\n";
}

View file

@ -35,8 +35,8 @@ hostname!= hostname
DOCS+= homepage.sgml
.PHONY: homepage.inc
homepage.inc: homepage.pl
${PERL} ${.CURDIR}/homepage.pl > ${.TARGET}
homepage.inc: ${DOC_PREFIX}/en_US.ISO8859-1/htdocs/internal/homepage.pl
${PERL} ${DOC_PREFIX}/en_US.ISO8859-1/htdocs/internal/homepage.pl > ${.TARGET}
homepage.html: homepage.inc
CLEANFILES+= homepage.inc

View file

@ -1,50 +0,0 @@
#!/usr/bin/perl
$passwd = '/etc/passwd';
$homepagedir = 'public_html';
@index = ('index.html', 'index.cgi');
$noindex = '.noindex';
open(P, 'ypcat 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://people.FreeBSD.org/~$login/">},
$firstgecos, "</A> ", join(', ', @gecos), "</LI>\n";
}

View file

@ -42,8 +42,8 @@ DOCS+= homepage.sgml
.if !make(install)
.PHONY: homepage.inc
.endif
homepage.inc: ${DOC_PREFIX}/en/internal/homepage.pl
${PERL} ${DOC_PREFIX}/en/internal/homepage.pl > ${.TARGET}
homepage.inc: ${DOC_PREFIX}/en_US.ISO8859-1/htdocs/internal/homepage.pl
${PERL} ${DOC_PREFIX}/en_US.ISO8859-1/htdocs/internal/homepage.pl > ${.TARGET}
homepage.html: homepage.inc
CLEANFILES+= homepage.inc