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

PATH environment variable handling



Hi Everyone,

This discussion is about the BRANCH : MASTER
These changes may be backported to 1.4 at a later date.
The Changes Have Not been merged into master yet, but will be in the next couple of days.

While improving handling of system config defaults I discovered that we were probably doing the wrong thing with the PATH environment variable.

The original code, took the PATH entry from ledgersmb.org and appended it to the existing PATH.
This could easily result in duplicate entries in the PATH.

For example
ledgersmb.conf has as it's default
    PATH= /bin:/usr/bin:/usr/local/bin:/usr/local/pgsql/bin

if the system PATH started out as
    PATH=/home/_user_/perl5/bin:/home/_user_/bin:/home/_user_/perl5/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin


then LedgerSMB would be running with

        PATH=/home/_user_/perl5/bin:/home/_user_/bin:/home/_user_/perl5/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/bin:/usr/bin:/usr/local/bin:/usr/local/pgsql/bin


as you can see, there are a few duplicates, and LedgerSMB must search through a lot of dir's to find a file.

I have changed the behavior to better match expectations about how ledgersmb.conf uses it's PATH setting.
PATH now defaults to
    PATH= /bin:/usr/bin:/usr/local/bin:/usr/local/pgsql/bin
but it is REPLACED by any PATH set in ledgersmb.conf

Does anyone have any thoughts about how we are now handling the PATH variable?

Also is everyone happy with the default path?

Regards
David G



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Ledger-smb-devel mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel