Date: Sun, 20 Dec 2009 15:34:08 +0100 From: Jilles Tjoelker <jilles@stack.nl> To: Doug Barton <dougb@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, freebsd-rc@FreeBSD.org, Hajimu UMEMOTO <ume@FreeBSD.org> Subject: Re: svn commit: r200743 - in head/usr.sbin: . service Message-ID: <20091220143408.GB46060@stack.nl> In-Reply-To: <4B2DD2A1.8060907@FreeBSD.org> References: <200912200134.nBK1YCAA048942@svn.freebsd.org> <yged42ackpc.wl%ume@mahoroba.org> <4B2DBB51.9060002@FreeBSD.org> <ygebphuceaw.wl%ume@mahoroba.org> <4B2DD2A1.8060907@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091220143408.GB46060>