From nobody Fri Apr 29 18:34:02 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 B4D2C1994191 for ; Fri, 29 Apr 2022 18:34:13 +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 4Kqh386520z4qqT for ; Fri, 29 Apr 2022 18:34:12 +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 06FC4C20; Fri, 29 Apr 2022 20:34:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1651257245; s=20210208-e7xh; d=mailfence.com; i=sysadmin.lists@mailfence.com; h=Date:From:Cc:Message-ID:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding; l=1281; bh=hZk6F2ZOWefJQyBoEZi3jLS8xJY5HoTu2ZvySDD1x9Q=; b=TnxUi5YmTlKllhBdQbjc7az8MTXG6y9gHH1QSYsPN0YdLLoZTb7/cKfjvCIVmkjw pwBs9Cb5/7OaWrDvMl/ul7JUduor4M6FbZgxBkifGCwlUcVPwvNm44KubHS1kNP9NjT JSbmQUys7qUYYSL1KAM5u3RR9oLsJPRT+MGetE5+F03XBv/VmysVdUlBY6k94ysYYvh fZS9ANTxEhkXwICzNShfokKxqSfwhX7PZfygpf10/0HGiEWnmpnntCtA6EKJY0jrWj1 k2VM1d3aMMPsQlPjG6ZUbnkaRMgENXxEIzLH4TJJRJXdOTcUyPHc5BviGtkFW/YkVAi 5HNTDXoghQ== Date: Fri, 29 Apr 2022 20:34:02 +0200 (CEST) From: Sysadmin Lists To: freebsd-hackers@freebsd.org, Eugene Grosbein Cc: Axel Rau Message-ID: <1022212612.357445.1651257242518@ichabod.co-bxl> In-Reply-To: <327ac19c-8617-f784-9591-5458e6c47eaa@grosbein.net> References: <187283243.91660.1651167612801@ichabod.co-bxl> <327ac19c-8617-f784-9591-5458e6c47eaa@grosbein.net> 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 X-Mailer: ContactOffice Mail X-ContactOffice-Account: com:312482426 X-Rspamd-Queue-Id: 4Kqh386520z4qqT 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=TnxUi5Ym; 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]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:212.3.242.64/26]; MIME_GOOD(-0.10)[text/plain]; R_DKIM_REJECT(0.00)[mailfence.com:s=20210208-e7xh]; NEURAL_HAM_LONG(-1.00)[-1.000]; 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)[-0.999]; DMARC_POLICY_ALLOW_WITH_FAILURES(-0.50)[]; MLMMJ_DEST(0.00)[freebsd-hackers]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:10753, ipnet:212.3.242.64/26, country:US]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N > ---------------------------------------- > From: Eugene Grosbein > Sent: Thu Apr 28 22:49:16 CEST 2022 > To: Sysadmin Lists , > Cc: Axel Rau > Subject: Re: rc script to let a service wait for db available > > > 29.04.2022 0:40, Sysadmin Lists wrote: > > > 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. > > When default environment satisfies the service, if does not fail being started at boot time. > If it runs just fine being started from logged-in user environment but not at boot time, > it is environment problem, in broad meaning. > > You're right. I misread what you were saying. You were addressing the specific failure the OP was describing, not saying PATH must always be set manually. -- Sent with https://mailfence.com Secure and private email