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

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



Daryl,

> 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
to

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

This change will be in the next release.

Regards,
Steve Emmerson

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