| 1 |
# |
| 2 |
# siteconfig.tcl - Site specific configuration changing getLoadedMatchingName |
| 3 |
# procedure to return firstly loaded module by default instead of lastly |
| 4 |
# loaded module. With this the firsly loaded module will be unloaded instead |
| 5 |
# of the lastly loaded in case multiple loaded modules match passed name to |
| 6 |
# unload. Which was the behavior of Modules v3.2 (compatibility) version. |
| 7 |
# |
| 8 |
# Author: Xavier Delaruelle <[email protected]> |
| 9 |
# Compatibility: Modules v4.2 |
| 10 |
# |
| 11 |
# Installation: put this file in the 'etc' directory of your Modules |
| 12 |
# installation. Refer to the "Modulecmd startup" section in the |
| 13 |
# module(1) man page to get this location. |
| 14 |
|
| 15 |
# override 'getLoadedMatchingName' procedure to set behavior argument to the |
| 16 |
# 'returnfirst' value by default |
| 17 |
rename ::getLoadedMatchingName ::__getLoadedMatchingName |
| 18 |
proc getLoadedMatchingName {name {behavior returnfirst} {loading 0}} { |
| 19 |
return [__getLoadedMatchingName $name $behavior $loading] |
| 20 |
} |
| 21 |
|
| 22 |
# vim:set tabstop=3 shiftwidth=3 expandtab autoindent: |