Changes are being made to improve the consistency and maintainability of the ups login files. Most of the files in the /usr/local/etc directory are being retired. The only required files in /usr/local/etc will be setups.csh and setups.sh; all other ups files will be located via the ups database(s). This report provides some details on the new ups file locations, and the changes being made to login scripts.
template_home v1_1 -f NULL |__login v1_1 -f NULL | |__setpath v1_1 -f NULL | |__setterm v1_1 -f NULL | |__setxwin v1_1 -fThe template_home product contains the user login scripts ( .bashrc, .cshrc, .login, .profile, and .shrc), and contains the only references to files which need to live outside the confines of the ups product area. These references to the setups.csh and setups.sh scripts are the means for establishing the location of the ups database(s) in the user's environment, and are all that ups needs to get started. These setups.*sh files will be located in one of three places:|__shrc v1_1 -f
To bring existing login scripts up to date with the new scheme for setting up the ups environment, wherever invocations of the old /usr/local/etc files are encountered in users' .bash_profile, .bashrc, .cshrc, .login, .profile, and .shrc scripts, the following actions are taken:
If no old-style invocations are found, no changes will be made, not even the removal of old copyright notices. Links are ignored.
The comment string used is ': #_UPS_# ', so that the changes made can be readily seen. The large majority of cases will look like the following:
: #_UPS_# if ( -r /usr/local/etc/fermi.profile ) then : #_UPS_# source /usr/local/etc/fermi.profile : #_UPS_# endif
The colons in these rather odd-looking comment strings are included to make the lines executable (as no-ops, essentially) so that the Korn-shell family doesn't complain about empty if-then-fi sequences, as in the next example.
Be aware that due to the limitless variety possible in invocations of the /usr/local/etc scripts, there may be some odd-looking results in certain cases. In these cases only the 'source' line will be commented out, and the surrounding lines will be left intact. For example:
if [ -f /usr/local/etc/fermi.login -a -f arbitrary.file ] then : #_UPS_# . /usr/local/etc/fermi.login fi
Note that semantic errors like broken if/then/endif constructs will not be fixed; only well-formed code is affected. Once you are happy with the changes, feel free to delete the commented lines, plus any surrounding code which is no longer useful.
There are a few of you who have such a unique way of doing things, that no amount of regular-expression trickery will suffice. You are on your own, but since you're the strong, independent types, this shouldn't be a big problem for you. You may inform yourselves in the new Fermilab standard way of doing things by examining the template files in one of the following directories:
/afs/fnal.gov/ups/template_home/v1_1/NULL/dotfiles.localized /fnal/ups/template_home/v1_1/NULL/dotfiles.localized
Questions or concerns may be sent to uas-group@fnal.gov.