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

[LDM #EHT-400909]: Setting $PATH in bin/ldmadmin


> I have a question about this line of code in bin/ldmadmin
> $ENV{'PATH'} =
> "$bin_path:/bin:/usr/bin:/usr/sbin:/sbin:/usr/ucb:/usr/usb:/usr/etc:/etc:$ENV{'PATH'}";
> Why is the ENV{'PATH'} added to the end, instead of perhaps behind
> $bin_path ?  This causes troubles when there is a $PATH conflict with a
> users path setup and the local system defaults....
> For the same reason ldmadmin puts $bin_path first, it should also put
> $ENV{'PATH'} second!!! :)
> My particular use case is the need to use a particular version of python,
> one which I find in /mesonet/python/bin/python
> So setting /mesonet/python/bin in the front of my $PATH in the environment
> files (.bash_profile .tcshrc etc) does no good, since ldmadmin will
> override it and pull /usr/bin in front of /mesonet/python/bin
> (I am trying to make a portable pqact.conf file taking advantage of
> /usr/bin/env python for example)
> Any comments?  Thanks!

I'm inclined to agree with you.  Feel free to change the line in question

    $ENV{'PATH'} = "$bin_path:$ENV{'PATH'}";

This change will be in the next release.

Steve Emmerson

Ticket Details
Ticket ID: EHT-400909
Department: Support LDM
Priority: Normal
Status: Closed

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.