/etc/paths vs /etc/paths.d
I am curious what the purpose of the directory /etc/paths.d is. My path looks like this, first four set on /etc/paths, the last one on /etc/paths.d/50-X11
echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
This is all done by Apple (Lion).
I am asking because I need to move /usr/loca/bin ahead of /usr/bin, which works fine if I edit /etc/paths. Adding to /etc/paths.d would not work for me as it seems entries in paths.d come after those in paths.
My question is which is the safest & most robust way to add to the path, systemwide (not just a .profile, etc in my home directory). I plan to start installing lots of 3rd party software and I do not want to let them touch /etc/paths.
Thank you