From owner-svn-src-all@FreeBSD.ORG Sun Dec 20 14:34:09 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C48F1106566C; Sun, 20 Dec 2009 14:34:09 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id 84A438FC0A; Sun, 20 Dec 2009 14:34:09 +0000 (UTC) Received: from toad.stack.nl (toad.stack.nl [IPv6:2001:610:1108:5010::135]) by mx1.stack.nl (Postfix) with ESMTP id DBC621DD413; Sun, 20 Dec 2009 15:34:08 +0100 (CET) Received: by toad.stack.nl (Postfix, from userid 1677) id C7B3B73FA1; Sun, 20 Dec 2009 15:34:08 +0100 (CET) Date: Sun, 20 Dec 2009 15:34:08 +0100 From: Jilles Tjoelker To: Doug Barton Message-ID: <20091220143408.GB46060@stack.nl> References: <200912200134.nBK1YCAA048942@svn.freebsd.org> <4B2DBB51.9060002@FreeBSD.org> <4B2DD2A1.8060907@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B2DD2A1.8060907@FreeBSD.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, freebsd-rc@FreeBSD.org, Hajimu UMEMOTO Subject: Re: svn commit: r200743 - in head/usr.sbin: . service X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Dec 2009 14:34:09 -0000 On Sat, Dec 19, 2009 at 11:30:41PM -0800, Doug Barton wrote: > Index: usr.sbin/service/service.sh > diff -u usr.sbin/service/service.sh.orig usr.sbin/service/service.sh > --- usr.sbin/service/service.sh.orig 2009-12-20 13:14:14.000000000 +0900 > +++ usr.sbin/service/service.sh 2009-12-20 13:17:44.420246627 +0900 > @@ -106,11 +106,15 @@ > exit 1 > fi > > +HOME=/ > +PATH=/sbin:/bin:/usr/sbin:/usr/bin > +export HOME PATH > +cd $HOME > + > for dir in /etc/rc.d $local_startup; do > if [ -x "$dir/$script" ]; then > [ -n "$VERBOSE" ] && echo "$script is located in $dir" > - $dir/$script $* > - exit $? > + exec env -i HOME=$HOME PATH=$PATH $dir/$script $* > fi > done The $* should be changed to "$@" here, to avoid inappropriate IFS splitting. (Even though rc.subr is broken in this way as well.) By the way, I agree with adding this utility. -- Jilles Tjoelker