From owner-freebsd-ports@freebsd.org Sat Mar 31 07:25:33 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CFA92F69D8F for ; Sat, 31 Mar 2018 07:25:32 +0000 (UTC) (envelope-from info@netocean.de) Received: from netocean.de (netocean.de [109.193.255.134]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C9FE7615F; Sat, 31 Mar 2018 07:25:31 +0000 (UTC) (envelope-from info@netocean.de) Received: by netocean.de (NetOcean MX, from userid 58) id C5B96134F39; Sat, 31 Mar 2018 09:25:23 +0200 (CEST) Received: from [172.18.46.151] (ip-134.119.39.184.servers.jiffybox.net [134.119.39.184]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by netocean.de (NetOcean MX) with ESMTPSA id 72E8F134F37; Sat, 31 Mar 2018 09:25:23 +0200 (CEST) Subject: Re: FreeBSD textproc/elasticsearch6 does not honour /etc/profile To: Mark Felder , freebsd-ports@freebsd.org References: <1522438499.493684.1321661104.266F8B86@webmail.messagingengine.com> From: =?UTF-8?Q?Leander_Sch=c3=a4fer?= Message-ID: <0d14ff1a-9ea9-2dc9-4ced-bc2b0d316e9d@netocean.de> Date: Sat, 31 Mar 2018 09:25:22 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1522438499.493684.1321661104.266F8B86@webmail.messagingengine.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Mar 2018 07:25:33 -0000 Hello Mark, Thanks for your reply. I didn't know about the elasticsearch_env="" - so thanksfor that. So my follow-up questions are: * How would I have to set up elasticsearch_env="", cause according to the man of env elasticsearch_env="-S -P /usr/local/bin:/usr/local/sbin" wouldn't do the job. * What needs to be changed, so elasticsearch's auto detect script would work with regular values of PATH? Cause currently the default PATH is like: PATH=/sbin:/bin:/usr/sbin:/usr/bin and this won't work with an openjdk compiled from ports. Cause this would be my prefered way. Can I post your replies in the FreeBSD forum? Might be useful for others as well ;) Thanks a lot Best regards, Leander Am 30.03.18 um 21:34 schrieb Mark Felder: > > On Thu, Mar 29, 2018, at 05:43, Leander Schäfer wrote: >> Hello, >> >> it looks like textproc/elasticsearch6 does not honour /etc/profile? >> Please have a look for detailed description and reproduction of the >> issue: >> https://forums.freebsd.org/threads/textproc-elasticsearch6-does-not-honour-etc-profile.65338/ >> >> Best regards, >> >> Leander S. > I'm pretty sure this is not supposed to work. /etc/profile is used by sh(1) and would only be read during a login shell. The FreeBSD rc subsystem uses "su -m" when running processes as a specific user, not "su -l". The "su -l" would fail because ElasticSearch's user has a default shell of /sbin/nologin. As far as I can tell this is normal behavior. > > If you need to change env for Elastic you can use the elasticsearch_env="" in /etc/rc.conf. Any further questions about overcoming issues in your environment are welcome. We also have a list for elastic now called "freebsd-elastic@FreeBSD.org". > > > Hope that helps, > >