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



Relevant Pages

  • Re: asrock, problem with nic after windows-boot - Exact Opposite issue the OP is having
    ... On 21 Jun 2006, in the Usenet newsgroup comp.os.linux.networking, in article ... If you are having trouble during boot, move the original scripts TEMPORARILY ... I'd grep for 'ZEROCONF' in ... individual commands, it's really not doing rocket science. ...
    (comp.os.linux.networking)
  • ntlib.cmd (Advanced NT/2K/XP/K3 Command Library)
    ... The latest Advanced Command Library for Windows NT/2K/XP/K3 ... MAINTAINABLE shell scripts without adding any third-party software. ... They are constructed entirely of builtin commands ...
    (microsoft.public.win32.programmer.tools)
  • ntlib.cmd (Advanced NT/2K/XP/K3 Command Library)
    ... The latest Advanced Command Library for Windows NT/2K/XP/K3 ... MAINTAINABLE shell scripts without adding any third-party software. ... They are constructed entirely of builtin commands ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: How to Create a TCP/IP PrinterPort on a MS Cluster 2k3 via Scr
    ... thus the creation of the port on the node. ... Download the Windows Server 2003 resource kit and add prnadmin.dll to the ... Do you actually think I would post these scripts if it didnt work? ... In your response include the commands you used. ...
    (microsoft.public.windows.server.clustering)
  • Re: Find components of "setup"?
    ... Most of these commands can be found by running pkgtool and selecting ... "setup" is not included in a Slackware install. ... shell script, so use your favorite text editor to read it. ... though IMHO much more powerful in shell scripts. ...
    (comp.os.linux.misc)