From nobody Thu Apr 28 17:40:12 2022 X-Original-To: freebsd-hackers@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 9F33B199F696 for ; Thu, 28 Apr 2022 17:40:16 +0000 (UTC) (envelope-from sysadmin.lists@mailfence.com) Received: from wilbur.contactoffice.com (wilbur.contactoffice.com [212.3.242.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kq2vM54XPz4tBP for ; Thu, 28 Apr 2022 17:40:15 +0000 (UTC) (envelope-from sysadmin.lists@mailfence.com) Received: from ichabod.co-bxl (ichabod.co-bxl [10.2.0.36]) by wilbur.contactoffice.com (Postfix) with ESMTP id 599831176; Thu, 28 Apr 2022 19:40:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1651167614; s=20210208-e7xh; d=mailfence.com; i=sysadmin.lists@mailfence.com; h=Date:From:Message-ID:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc; l=1166; bh=BSqg2qIiAA+YsuAXBDljTZoGUIJlgLktZkfsyqrqv5o=; b=qOiqkcdV2XG0cIwspFAaiKDrtXPApch2C0DNBuVAytSxU4FtBi2oJPMUVRibYP1t haeLK6H5XvEpokvk/Mb8r1YRfob/xPAGsaWwd0NzepQwTbqsgABTtGU0SENV5tgf/in XtQ0zxjpTrFAf7aBoK2mVY7sjki2vTtdjxJj73K3rEm4RpUjqnmJF9nEoeoWzmXuaR5 V8XqRVZ+tSowVkx0IPLsMUAtzm+hOUwTrvhof7/QM/3Y/tLkkRbZ73uyPkQ5hfSqK5U sFGbNbHQr2NT3Poo22YXJ89InzvBleNwyaeonrFRWXVau3OyDujdOH4cvMnF8VCn1+P oig1WcBMFw== Date: Thu, 28 Apr 2022 19:40:12 +0200 (CEST) From: Sysadmin Lists To: freebsd-hackers@freebsd.org Message-ID: <187283243.91660.1651167612801@ichabod.co-bxl> In-Reply-To: References: Subject: Re: rc script to let a service wait for db available List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Eugene Grosbein , Axel Rau X-Mailer: ContactOffice Mail X-ContactOffice-Account: com:312482426 X-Rspamd-Queue-Id: 4Kq2vM54XPz4tBP X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=fail ("body hash did not verify") header.d=mailfence.com header.s=20210208-e7xh header.b=qOiqkcdV; dmarc=pass (policy=quarantine) header.from=mailfence.com; spf=pass (mx1.freebsd.org: domain of sysadmin.lists@mailfence.com designates 212.3.242.68 as permitted sender) smtp.mailfrom=sysadmin.lists@mailfence.com X-Spamd-Result: default: False [-3.79 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:212.3.242.64/26:c]; R_DKIM_REJECT(0.00)[mailfence.com:s=20210208-e7xh]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[mailfence.com:-]; DMARC_POLICY_ALLOW(0.00)[mailfence.com,quarantine]; RCVD_IN_DNSWL_NONE(0.00)[212.3.242.68:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW_WITH_FAILURES(-0.50)[]; MLMMJ_DEST(0.00)[freebsd-hackers]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:10753, ipnet:212.3.242.64/26, country:US]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N This isn't entirely true. rc scripts have a default PATH and HOME. From service(8): ENVIRONMENT When used to run rc.d scripts the service command sets HOME to / and PATH to /sbin:/bin:/usr/sbin:/usr/bin which is how they are set in /etc/rc at boot time. Something similar holds true for `cron' as well. I see a lot of unnecessary setting of absolute paths for binaries that reside in default PATHs. > ---------------------------------------- > From: Eugene Grosbein > Sent: Thu Apr 28 11:53:42 CEST 2022 > To: Axel Rau , > Subject: Re: rc script to let a service wait for db available > > > 28.04.2022 15:55, Axel Rau wrote: > > > Ah - yes. Now it calls the script in the background, but there is still an issue. > > It does not start the server, as it does while calling from the command line. > > Generally it means bugs in the startup script: it relies on calling process environment > like PATH, LANG etc. It must not. It must set needed variables all by itself > starting from PATH. > > > -- Sent with https://mailfence.com Secure and private email