Re: svn commit: r268641 - head/usr.sbin/service
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 <editor@callfortesting.org>
> 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--
討論串 (同標題文章)
完整討論串 (本文為第 2 之 11 篇):