From owner-svn-doc-head@FreeBSD.ORG Fri Aug 31 12:19:05 2012 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 53A351065673; Fri, 31 Aug 2012 12:19:05 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EDA28FC25; Fri, 31 Aug 2012 12:19:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7VCJ5js028972; Fri, 31 Aug 2012 12:19:05 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7VCJ5q4028970; Fri, 31 Aug 2012 12:19:05 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201208311219.q7VCJ5q4028970@svn.freebsd.org> From: Gavin Atkinson Date: Fri, 31 Aug 2012 12:19:05 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r39478 - head/en_US.ISO8859-1/htdocs/internal X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 12:19:05 -0000 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(

) { ($login,$password,$uid,$gid,$gcos,$home,$shell) = split(/:/); @@ -14,7 +15,7 @@ while(

) { $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)$%;