cvs commit: src/etc/rc.d hostname ipfilter ipsec netif ttys

Mike Makonnen mtm at identd.net
Thu Jul 31 08:58:03 PDT 2003


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 at identd.net | D228 1A6F C64E 120A A1C9  A3AA DAE1 E2AF DBCC 68B9
mtm at FreeBSD.Org| FreeBSD - Unleash the Daemon!
-------------- next part --------------
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


More information about the cvs-src mailing list