Date: Fri, 29 Apr 2022 20:34:02 +0200 (CEST) From: Sysadmin Lists <sysadmin.lists@mailfence.com> To: freebsd-hackers@freebsd.org, Eugene Grosbein <eugen@grosbein.net> Cc: Axel Rau <Axel.Rau@chaos1.de> Subject: Re: rc script to let a service wait for db available Message-ID: <1022212612.357445.1651257242518@ichabod.co-bxl> In-Reply-To: <327ac19c-8617-f784-9591-5458e6c47eaa@grosbein.net> References: <f6201772-d124-a08f-3623-25f1a6190faf@Chaos1.DE> <c17abf27-0997-5627-b9c8-98a76d8946a3@grosbein.net> <dd303c84-9f54-78a5-16e2-81d32f2033d3@Chaos1.DE> <fba9b121-6a2e-daf6-a1ea-64227ad8266d@grosbein.net> <187283243.91660.1651167612801@ichabod.co-bxl> <327ac19c-8617-f784-9591-5458e6c47eaa@grosbein.net>
next in thread | previous in thread | raw e-mail | index | archive | help
> ---------------------------------------- > From: Eugene Grosbein <eugen@grosbein.net> > Sent: Thu Apr 28 22:49:16 CEST 2022 > To: Sysadmin Lists <sysadmin.lists@mailfence.com>, <freebsd-hackers@freebsd.org> > Cc: Axel Rau <Axel.Rau@chaos1.de> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1022212612.357445.1651257242518>