From owner-svn-src-all@FreeBSD.ORG Sun Dec 20 04:51:16 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 CB0B0106568B; Sun, 20 Dec 2009 04:51:16 +0000 (UTC) (envelope-from ume@mahoroba.org) Received: from asuka.mahoroba.org (ent.mahoroba.org [IPv6:2001:2f0:104:8010::1]) by mx1.freebsd.org (Postfix) with ESMTP id EADAA8FC08; Sun, 20 Dec 2009 04:51:15 +0000 (UTC) Received: from yuga.mahoroba.org (ume@yuga.mahoroba.org [IPv6:2001:2f0:104:8010:21b:d3ff:fe38:5381]) (user=ume mech=CRAM-MD5 bits=0) by asuka.mahoroba.org (8.14.3/8.14.3) with ESMTP/inet6 id nBK4ou9e073116 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 20 Dec 2009 13:51:00 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Sun, 20 Dec 2009 13:50:55 +0900 Message-ID: From: Hajimu UMEMOTO To: Doug Barton In-Reply-To: <200912200134.nBK1YCAA048942@svn.freebsd.org> References: <200912200134.nBK1YCAA048942@svn.freebsd.org> User-Agent: xcite1.58> Wanderlust/2.15.7 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-2022-JP-2?B?R29qGyQoRCtXGyhC?=) APEL/10.7 Emacs/23.1 (i386-portbld-freebsd8.0) MULE/6.0 (HANACHIRUSATO) X-Operating-System: FreeBSD 8.0-STABLE X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="Multipart_Sun_Dec_20_13:50:55_2009-1" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (asuka.mahoroba.org [IPv6:2001:2f0:104:8010::1]); Sun, 20 Dec 2009 13:51:00 +0900 (JST) X-Virus-Scanned: clamav-milter 0.95.3 at asuka.mahoroba.org X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on asuka.mahoroba.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org 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 04:51:17 -0000 --Multipart_Sun_Dec_20_13:50:55_2009-1 Content-Type: text/plain; charset=US-ASCII Hi, >>>>> On Sun, 20 Dec 2009 01:34:12 +0000 (UTC) >>>>> Doug Barton said: dougb> Author: dougb dougb> Date: Sun Dec 20 01:34:12 2009 dougb> New Revision: 200743 dougb> URL: http://svn.freebsd.org/changeset/base/200743 dougb> Log: dougb> The service command is an easy interface to the rc.d system. dougb> Its primary purpose is to start and stop services provided by dougb> the rc.d scripts, however it can also be used to list the scripts dougb> using various criteria. dougb> Added: dougb> head/usr.sbin/service/ dougb> head/usr.sbin/service/Makefile (contents, props changed) dougb> head/usr.sbin/service/service.8 (contents, props changed) dougb> head/usr.sbin/service/service.sh (contents, props changed) dougb> Modified: dougb> head/usr.sbin/Makefile I believe this addition is useful. I'm using similar script locally. However, we should consider the environment variables and the current directory, IMO. Could you include the attached patch? Sincerely, --Multipart_Sun_Dec_20_13:50:55_2009-1 Content-Type: text/x-patch; type=patch; charset=US-ASCII Content-Disposition: attachment; filename="service-env.diff" Content-Transfer-Encoding: 7bit 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 --Multipart_Sun_Dec_20_13:50:55_2009-1 Content-Type: text/plain; charset=US-ASCII -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ --Multipart_Sun_Dec_20_13:50:55_2009-1--