[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 Sun, 18 Apr 1999, Anthony Towns wrote:

> Alternately, something along the lines of ``Scripts must not assume
> the environment is at all sensible, and should do something like the
> following to ensure it is...'' would be fine, with the ellipses filled
> in. Just changing the PATH isn't particularly cool though.

This is something I like, since it reaches my goals and you're cool with
it (so I guess we satisfy both sides of the argument).

Can we run with this, fill in the wholes and make a final proposal on it?

> Please: spend a bit more time working out how to solve the wider issue,
> even if only for /etc/init.d/*, and I'll be very happy. But special
> cases of special cases that I don't even have bugs for...? Eh.

I like your proposal.

> sudo, btw, seems to take care of at least some of this properly for
> me. That might be a good place to look for exactly what needs to be
> changed. Seeing what environment init sets up (ie browsing the manpage
> and code) would probably be helpful too.

sudo is one place where the problem exists, but rsh and ssh also contain
the problem (and I'm sure there's other programs). I'm not sure how
changing those programs could easily solve the wider problem (as you've
mentioned it), although it could (once implemented) solve the problem for
a wider range of environment variables (TZ, PATH, among others) while the
"change it in the script" solution only solves it for a limited number at
any given time.

I'm not sure what the best solution is -- I like your proposal above that
I quoted. Essentially, the script owner needs to think through whatever
environment it needs and try and make sure it has a reasonable one. It's
open and requires no specific changes, until the bug reports start flowing
in.

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

Attachment: pgpKMT5XJdI1s.pgp
Description: PGP signature


Reply to: