svn commit: r39478 - head/en_US.ISO8859-1/htdocs/internal
Gavin Atkinson
gavin at FreeBSD.org
Fri Aug 31 12:19:05 UTC 2012
Author: gavin
Date: Fri Aug 31 12:19:04 2012
New Revision: 39478
URL: http://svn.freebsd.org/changeset/doc/39478
Log:
Change the script to generate the list of personal homepages away from
using "ypcat passwd" and towards "getent passwd". With work taking place
on the FreeBSD cluster, the former will eventually start failing.
While here, increase the lowest UID we care about from 100 to 500.
In reality, daemons may get any user ID below 1000, but the FreeBSD
cluster has some longstanding users with IDs in the 500s. At the
very least, this change is no less wrong than the existing code.
Approved by: bcr (mentor)
Modified:
head/en_US.ISO8859-1/htdocs/internal/homepage.pl
Modified: head/en_US.ISO8859-1/htdocs/internal/homepage.pl
==============================================================================
--- head/en_US.ISO8859-1/htdocs/internal/homepage.pl Fri Aug 31 09:24:58 2012 (r39477)
+++ head/en_US.ISO8859-1/htdocs/internal/homepage.pl Fri Aug 31 12:19:04 2012 (r39478)
@@ -1,11 +1,12 @@
#!/usr/bin/perl
-$passwd = '/etc/passwd';
+# $FreeBSD$
+
$homepagedir = 'public_html';
@index = ('index.html', 'index.cgi');
$noindex = '.noindex';
-open(P, 'ypcat passwd |') || die "open $passwd: $!\n";
+open(P, 'getent passwd |') || die "getent passwd: $!\n";
undef @pages;
while(<P>) {
($login,$password,$uid,$gid,$gcos,$home,$shell) = split(/:/);
@@ -14,7 +15,7 @@ while(<P>) {
$gcos =~ s/,.*//;
# disable daemons
- next if $uid <= 100;
+ next if $uid < 500;
next if $login eq 'nobody';
next if $shell =~ ~ m%/(pppd|sliplogin|nologin|nonexistent)$%;
More information about the svn-doc-head
mailing list