svn commit: r200743 - in head/usr.sbin: . service
Jilles Tjoelker
jilles at stack.nl
Sun Dec 20 14:34:09 UTC 2009
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
More information about the svn-src-all
mailing list