Re: rc script to let a service wait for db available
- In reply to: Eugene Grosbein : "Re: rc script to let a service wait for db available"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 Apr 2022 18:34:02 UTC
> ---------------------------------------- > From: Eugene Grosbein <email@example.com> > Sent: Thu Apr 28 22:49:16 CEST 2022 > To: Sysadmin Lists <firstname.lastname@example.org>, <email@example.com> > 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