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

Re: /etc/init.d scripts WAS: Re: start-stop-daemon on Debian (fwd)



On Mon, 19 Apr 1999, Steve Greenland wrote:

> directories". My point is that if for some reason a bunch of the
> standard programs move to some other directory, then that new directory
> will need to be added to all the scripts. The scripts don't *know* what
> paths they need, except by convention. Is that convention likely to
> change? Probably not, but it *has* happened in the past (/etc -> /sbin
> and /usr/sbin), and ignoring the possibility that it will happen again
> is shortsighted.

Yes, but because of the chance of such a major change taking place (and a
very unlikely one) do we not allow "backup" options? And even if it does
take place, so big deal, it's not likely to happen until another release
of Debian is out (it's not going to happen interim) -- and if that does
happen, then changing the PATH setting in scripts is not going to be a big
change (after all, it's a minor text change) and will probably be one of
MANY other changes. I can see config files being changed, cron jobs,
private scripts people may have -- among many other things -- that will
need to be changed should such a thing happen.

So a PATH line is a big deal?

> If you put "PATH=$PATH:/bin:/usr/bin:/sbin:/usr/sbin" then you've
> hardcoded a good chunk of the *standard* root path in each script. If
> that changes, then you've got to go back and fix each script.

Why? If that scripts *needs* /bin, /usr/bin , /sbin and /usr/sbin then you
change nothing. OTOH, if it doesn't need all of them, then they all
shouldn't be there.

> And appending doesn't really help. If you assume that you can't trust
> root's path, then you have to override it, or else you just trade one
> set of problems ("can't find route") for another ("oops, just found
> a executable called 'route' in /root/bin, which does something else
> entirely").

It's not just root's path. What if I have root permissions on my personal
user? I should be able to run these programs and have them work -- and
nobody should be able to tell me otherwise.

If your PATH does things you don't want it to do, well, then you have to
be careful about naming your own programs the same thing as big programs
that are widely distributed.

> I think we'll probably be stuck going back and forth on this, because I
> disagree with the fundamental philosophy (as I outlined in my previous
> message, and upon which you chose not to comment). Short version: the

I'm looking at the practical application and the problems of it, rather
than philosophy. I'm having trouble seeing the problem #1 & 2 that you
mentioned above. Problem #3 is a philosophical issue which I'm dealing
with above.

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



Reply to: