From nobody Thu May 27 10:19:01 2021 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BF12DD79B61 for ; Thu, 27 May 2021 10:19:10 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from mail.punkt.de (mail.punkt.de [217.29.41.227]) (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 4FrP1T62QNz4r7Q for ; Thu, 27 May 2021 10:19:09 +0000 (UTC) (envelope-from hausen@punkt.de) Received: from [217.29.46.87] (kagate.punkt.de [217.29.33.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.punkt.de (Postfix) with ESMTPSA id A14551D8D2 for ; Thu, 27 May 2021 12:19:02 +0200 (CEST) From: "Patrick M. Hausen" Content-Type: multipart/signed; boundary="Apple-Mail=_20512DCB-17C5-4375-83A6-05A5FA9FF3B9"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.20\)) Subject: Re: Service started via service(8) fails Date: Thu, 27 May 2021 12:19:01 +0200 References: <202105270818.14R8Ig20087984@nordnytt.cc.uit.no> To: freebsd-stable stable In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3445.104.20) X-Rspamd-Queue-Id: 4FrP1T62QNz4r7Q X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hausen@punkt.de designates 217.29.41.227 as permitted sender) smtp.mailfrom=hausen@punkt.de X-Spamd-Result: default: False [-4.89 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:217.29.32.0/20]; HAS_ATTACHMENT(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.993]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[217.29.41.227:from]; ASN(0.00)[asn:16188, ipnet:217.29.32.0/20, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; R_DKIM_NA(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; DMARC_NA(0.00)[punkt.de]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[217.29.41.227:from:127.0.2.255]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-stable] X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_20512DCB-17C5-4375-83A6-05A5FA9FF3B9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi all, > Am 27.05.2021 um 11:56 schrieb Eugene Grosbein : >=20 > 27.05.2021 15:18, Ingeborg Hellemo wrote: >=20 >> FreeBSD 11.4-RELEASE-p3 >>=20 >> What, if any, difference is there between using 'service = restart' >> and /usr/local/etc/rc.d/ restart'? >>=20 >> I have this mindboggling situation where using 'service tac_plus = restart' >> leads to a service that is running but not working properly, whereas >> '/usr/local/etc/rc.d/tac_plus restart' gives me a working service. >=20 > The "service" command resets the environment but direct script = invocation inherits the environment. > Such problem often is a sign of wrong startup script or configuration = of the service > that makes incorrect assumption about PATH and/or locale settings. > It may fail to find some commands because it does not set PATH to = include /usr/local/... directories > or fail due to incorrect locale assumptions or even TZ (time zone) = settings. Since /usr/sbin/service is itself a shell script you could try sh -x /usr/sbin/service tac_plus restart sh -x /usr/local/etc/rc.d/tac_plus restart and compare what is actually executed. Kind regards, Patrick -- punkt.de GmbH Patrick M. Hausen .infrastructure Kaiserallee 13a 76133 Karlsruhe Tel. +49 721 9109500 https://infrastructure.punkt.de info@punkt.de AG Mannheim 108285 Gesch=C3=A4ftsf=C3=BChrer: J=C3=BCrgen Egeling, Daniel Lienert, Fabian = Stein --Apple-Mail=_20512DCB-17C5-4375-83A6-05A5FA9FF3B9 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEgzqrjO/mj9CSsTg2kG8u4u3aiVwFAmCvchUACgkQkG8u4u3a iVzLTgf7Buavle4bgMQ0gOpJzKtUugZvva0CPQ1/1+GNqOZAAoCJzg4tSN0h2xrE fV0k24r7UBo9Dmko7LtksgS0/cD1FVSn/ZU4TzAQnBJlXfiVHoEiVHJeT+Hb/LZb hx7jM5Ogq7Ib7XkhyEKjrzS9qMAUOCgYXciaqOvVWp3tqVM6xa5Gg4CUrlK/dY1N Q2R6DKjyk+Kmnt9p/gyi0tBXVuzj88q9eAnL9d1XYkCXEPz0fToN+8tSzJ6THYC0 O7FZLxp+wqr6YqEAHwFrDN8H4TPw58jDPcidXjurWSR+l84mhLp1/gZ1cpSIrAU6 y5xU9DdTawTOZ58Jx3gEDpbXfT9Whg== =i0YY -----END PGP SIGNATURE----- --Apple-Mail=_20512DCB-17C5-4375-83A6-05A5FA9FF3B9--