Hi, The environment-setting script
eval `$prefix/etc/rc --eval all env` is very useful, but has one inconvenient side-effect: it insists on putting certain system directories (e.g., /bin, /usr/bin, etc.) at the end of the path variable it is modifying (e.g., PATH, MANPATH, LD_LIBRARY_PATH, INFOPATH), whether these system directories are already present in the path variable or not. The rcPath() function in etc/rc.func does check to see if the system directory is present in the file system, and does not add it if it is not; but it does no similar check to see if it is present in the path variable it is modifying. The net result in our environment is that certain commands will break after setting the openpkg environment in this fashion. One example: we also use the Berkeley system library on our systems, but place it after /usr/bin and /bin, because we don't want to use the Berkeley versions of commands unless there is no comparable native version. However, after executing "eval `$prefix/etc/rc --eval all env`" the Berkeley version of commands becomes the preferred one. Since I'd like to make sure that I stay in sync with future versions of OpenPKG, I would prefer to continue to use "eval `$prefix/etc/rc --eval all env`" rather than write my own environment-setting script from scratch. So I decided to modify rcPath() such that when the "-e" option is passed to it, it makes sure that the passed system directory is *both* present in the file system and *not* present in the path variable before it adds the system directory to the path variable. My question is whether you would entertain my submitting this change to rc.func for inclusion as part of the OpenPKG base package. Thanks, Dennis Dennis McRitchie Computational Science and Engineering Support (CSES) Academic Services Department Office of Information Technology Princeton University ______________________________________________________________________ The OpenPKG Project www.openpkg.org Developer Communication List openpkg-dev@openpkg.org