Mailinglist Archive: opensuse (714 mails)

< Previous Next >
Re: [opensuse] where can I change $PATH
On 10/2/2011 11:16 PM, Andreas wrote:
Am 02.10.2011 08:37, schrieb Brian K. White:

You don't want to remove any of the stock directories from PATH.
OK, I disregarded that OpenSuse stuffs more or less every binary in just
a couple of bin-dirs so removing this bin wouldn't be exactly helpfull.

That is how all unix works, not opensuse.


1st - search for a properly packaged newer version of the app at
build.opensuse.org. Install that rpm and it takes care of everything.
This is the issue.
AFAIK the most recent PostgreSQL server in the repositories is 9.0.4 and
even this is in an additional repo and not the standard 11.4.
I had to install the binaries compiled by EnterpriseDB which don't come
as rpm and aren't added to the package management. It seemed advisable
to fetch the latest security patched version and don't wait till OS12.1
comes out.



That will affect all subsequent interactive logins, and nothing else,
not cron jobs, not initrc scripts, not cgi's etc.
So I'll need to change my scripts that get run by cron to use full paths
instead of letting bash search $PATH.
Thats a wee bit incovenient but so what.

If you want to add a directory to PATH for all cron jobs, you can do that in /etc/crontab

If you only need to add the special dir to PATH for one or a few scripts, you can do that right in the script itself, anywhere near the top, before the special commands get run.
PATH=/opt/foo:$PATH

for other contexts, other things.

Using full explicit paths to individual commands in scripts is the shortsighted, inflexible, quickest broken and easiest broken way so you don't want to do that.

--
bkw
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups