From owner-cvs-all@FreeBSD.ORG Thu Jul 31 08:58:02 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBA1437B401; Thu, 31 Jul 2003 08:58:02 -0700 (PDT) Received: from pool-151-200-10-97.res.east.verizon.net (pool-138-88-5-64.res.east.verizon.net [138.88.5.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id 13D6743FBF; Thu, 31 Jul 2003 08:57:55 -0700 (PDT) (envelope-from mtm@identd.net) Received: from kokeb.ambesa.net (b7t1koyqemy54hxa@localhost [127.0.0.1]) id h6VFvfJO024232; Thu, 31 Jul 2003 11:57:41 -0400 (EDT) (envelope-from mtm@identd.net) Received: (from mtm@localhost) by kokeb.ambesa.net (8.12.9/8.12.9/Submit) id h6VFvVAe024231; Thu, 31 Jul 2003 11:57:31 -0400 (EDT) (envelope-from mtm@identd.net) X-Authentication-Warning: kokeb.ambesa.net: mtm set sender to mtm@identd.net using -f Date: Thu, 31 Jul 2003 11:57:31 -0400 From: Mike Makonnen To: Bruce Evans Message-ID: <20030731155730.GA23825@kokeb.ambesa.net> References: <200307301853.h6UIrxY4063377@repoman.freebsd.org> <20030731191020.Q642@gamplex.bde.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="qDbXVdCdHGoSgWSk" Content-Disposition: inline In-Reply-To: <20030731191020.Q642@gamplex.bde.org> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD/5.1-CURRENT (i386) cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/etc/rc.d hostname ipfilter ipsec netif ttys X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jul 2003 15:58:03 -0000 --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jul 31, 2003 at 07:17:19PM +1000, Bruce Evans wrote: > On Wed, 30 Jul 2003, Mike Makonnen wrote: > > > mtm 2003/07/30 11:53:59 PDT > > > > FreeBSD src repository > > > > Modified files: > > etc/rc.d hostname ipfilter ipsec netif ttys > > Log: > > tty whacking should occur early, but not so early that the > > required commands are not on a mounted file system. > > > > Noticed by: bde > > Thanks. Now `id' is the only command used before its file system > is mounted on my nfs clients. id seems to be used only in rc.subr. What do you think of the following ? Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mtm@identd.net | D228 1A6F C64E 120A A1C9 A3AA DAE1 E2AF DBCC 68B9 mtm@FreeBSD.Org| FreeBSD - Unleash the Daemon! --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="id.diff" Index: etc/rc.subr =================================================================== RCS file: /home/ncvs/src/etc/rc.subr,v retrieving revision 1.14 diff -u -r1.14 rc.subr --- etc/rc.subr 24 Jul 2003 18:17:21 -0000 1.14 +++ etc/rc.subr 31 Jul 2003 15:54:58 -0000 @@ -47,6 +47,8 @@ SYSCTL_N="${SYSCTL} -n" CMD_OSTYPE="${SYSCTL_N} kern.ostype" OSTYPE=`${CMD_OSTYPE}` +ID="/usr/bin/id" +IDCMD="if [ -x $ID ]; then $ID -un; fi" case ${OSTYPE} in FreeBSD) @@ -504,7 +506,7 @@ _group=\$${name}_group _groups=\$${name}_groups if [ -n "$_user" ]; then # unset $_user if running as that user - if [ "$_user" = "$(id -un)" ]; then + if [ "$_user" = "$(eval $IDCMD)" ]; then unset _user fi fi --qDbXVdCdHGoSgWSk--