Imported the Spanish Web pages, except the
english sub directories: cgi, commercial, gallery, gifs which are redundant and will never be translated and the spanish sub directories: doc-es, docs-es Submitted by: "Jesus Rodriguez" <jesusr@ncsa.es> Fix Makefiles errors. `Make all install' runs fine. Currently, many the links to the sub directories cgi, commercial, gallery, gifs are broken. The links should point to the English orginal files.
This commit is contained in:
parent
1699e994f5
commit
646ddd7e13
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=4248
160 changed files with 22933 additions and 0 deletions
50
es/internal/homepage.pl
Normal file
50
es/internal/homepage.pl
Normal 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";
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue