From owner-svn-src-all@FreeBSD.ORG Tue Jul 15 17:59:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D8529A5 for ; Tue, 15 Jul 2014 17:59:23 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ECCF2226 for ; Tue, 15 Jul 2014 17:59:23 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id s6FHxN96073411 for ; Tue, 15 Jul 2014 17:59:23 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s6FHxNOV073405 for svn-src-all@freebsd.org; Tue, 15 Jul 2014 17:59:23 GMT (envelope-from bdrewery) Received: (qmail 6840 invoked from network); 15 Jul 2014 12:59:14 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 15 Jul 2014 12:59:14 -0500 Message-ID: <53C56BE9.9050304@FreeBSD.org> Date: Tue, 15 Jul 2014 12:59:05 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Devin Teske , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r268641 - head/usr.sbin/service References: <201407150218.s6F2Itj8044531@svn.freebsd.org> In-Reply-To: <201407150218.s6F2Itj8044531@svn.freebsd.org> X-Enigmail-Version: 1.6 OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="du8Fp9xm8vnflogqDqwDTjjqJhVCmf8T6" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 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: Tue, 15 Jul 2014 17:59:23 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --du8Fp9xm8vnflogqDqwDTjjqJhVCmf8T6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 7/14/2014 9:18 PM, Devin Teske wrote: > Author: dteske > Date: Tue Jul 15 02:18:55 2014 > New Revision: 268641 > URL: http://svnweb.freebsd.org/changeset/base/268641 >=20 > Log: > Fix an issue with service(8) where utilities such as screen(1) and tm= ux(1) > would behave differently when utilizing rc-script was invoked manuall= y vs. > service(8). The issue being that these utilities require the TERM env= iron > variable to be set and service(8) was not passing it down. > =20 > Reported by: Michael Dexter > PR: bin/191869 > Reviewed by: allanjude > MFC after: 3 days > X-MFC-to: stable/10, stable/9 >=20 > Modified: > head/usr.sbin/service/service.sh >=20 > Modified: head/usr.sbin/service/service.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/service/service.sh Tue Jul 15 01:03:29 2014 (r268640)= > +++ head/usr.sbin/service/service.sh Tue Jul 15 02:18:55 2014 (r268641)= > @@ -139,7 +139,7 @@ cd / > for dir in /etc/rc.d $local_startup; do > if [ -x "$dir/$script" ]; then > [ -n "$VERBOSE" ] && echo "$script is located in $dir" > - exec env -i HOME=3D/ PATH=3D/sbin:/bin:/usr/sbin:/usr/bin $dir/$scri= pt $* > + exec env -i HOME=3D/ PATH=3D/sbin:/bin:/usr/sbin:/usr/bin TERM=3D"$T= ERM" $dir/$script $* > fi > done > =20 >=20 Hm, I'm not sure about this. The "behaves differently" is exactly the reason for service(8). It runs with a clean environment such as the boot does. Running an rc script without service(8) will give wrong behavior in many scripts that do not match boot-time behavior. As far as I can tell, TERM is not set on boot. So the rc script would also not work on boot. So this change is wrong. --=20 Regards, Bryan Drewery --du8Fp9xm8vnflogqDqwDTjjqJhVCmf8T6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJTxWvtAAoJEDXXcbtuRpfPPg0IAMTx0rqs08Lko1eWJQDDbWxl 7PPDglNTdP+YbfL+KV1dgTkghLyq2eUC+kuC4dyv1yyGV18aGArbEWF47MUvsAut /mLB8RsoHVu64hLy7biKSOQpiVY4VftZNJdSMl6uqrlmN8cRwmWhh8XiHaD4G26z RkzVoU4gkfGjzAiBjNb/uFr16jWDK3fEJGDqQRBDhdJk4rVkfJa8P4swKkzHp5KY x09iKa/v4ehSmgDCXtJHIYe9xmML7onQnb4h+pIopcNsDSv+zzxMlGFNs/whf5Aw gE7lkKUfDWTGmdm0EQTyXdgnhE9KG29iqsYzZ06DbeGvSzwBpKET4ZUuwE8N+F4= =Y7B9 -----END PGP SIGNATURE----- --du8Fp9xm8vnflogqDqwDTjjqJhVCmf8T6--