[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/init.d scripts



On Sat, 17 Apr 1999, Steve Greenland wrote:

> > Unless, of course, the default system $PATH has been changed, for whatever
> > reason.
> 
> But if it was changed for a reason, then the scripts shouldn't override
> it.

What if they append to it? If they don't, we risk the situation
that they are now broken and in extreme circumstances, that could mean the
system can't boot properly or that something critical isn't working. In
any case, appending leaves the choice of "overriding" up to the sysadmin,
but we leave a "backup" option. But regardless, let's say that the PATH
isn't being set, for any other reason -- by default. This simple change of
adding an appending PATH line to each script will afford us a simple,
non-harming backup.

> > What if I change the path? These scripts should work even if I change the
> > default path. And certainly adding a PATH line isn't going to break the
> > scripts, is it?
> 
> If FHS 4.0 changes the standard sysadmin bin directory from /sbin and
> /usr/sbin to /sysadmin and /usr/lib/sysadmin, then yes, all the scripts
> are now broken, and all of them have to be fixed. Yes, I know that's an
> unlikely example.

One that's easily fixed though.

> The real point is that there are two conflicting desires:
> 
> 1. That the sysadmin be able to make stupid changes to the environment,
> and that everything still work.
>
> 2. That the sysadmin be able to make clever changes to the environment,
> and have it affect everything in the desired way.
> 
> The cumulative effort of requiring everyone to add PATH settings to
> every script is not insignificant. The only people it helps are those
> who want to make silly changes to their path. Why should we spend the
> effort to accomodate silly people?

It's not only to accomodate silly people -- it's to make sure the scripts
work when, for some reason, the PATH isn't being set. (The PATH being
changed is just the other reason for this).

If the PATH in the scripts is being APPENDED to the currently set PATH,
then I see no problem with #2 above -- which, you're correct, is the most
important consideration of the two.

-- 
Brock Rozen                                              brozen@torah.org
Director of Technical Services                              (410)358-9800
Project Genesis                                     http://www.torah.org/ 




Reply to: