Rev | Line | |
---|
[16] | 1 | #!/bin/bash |
---|
| 2 | # |
---|
| 3 | # This wrapper try to remove system's unmodified environment variables and propagate user environments on the nodes. |
---|
| 4 | # |
---|
| 5 | # version 1.0 by Nicolas Capit (initial version for PATH and LD_LIBRARY_PATH) |
---|
| 6 | # version 1.1 by Patrick Begou (All the environment excepted.... that could make problems!) |
---|
| 7 | # |
---|
| 8 | |
---|
| 9 | HOST=$1 |
---|
| 10 | shift |
---|
| 11 | |
---|
| 12 | MYENV=$( env \ |
---|
| 13 | | grep "^[ABCDEFGHIJKLMNOPQRSTUVWXYZ]" \ |
---|
| 14 | | egrep -v "^USER=|^TERM=|^OAR|^SGE_|^LS_COLORS=|^ENV=|^BASH_ENV=|^HOSTNAME=|^LOGNAME=|^MAIL=|^MANPATH=|^OMPI_MCA_plm_rsh_agent=|^PWD=|^SHELL=|^SSH_|^SUDO_COMMAND=|^HOME=|^DISPLAY=|^SHLVL=" \ |
---|
| 15 | | sort \ |
---|
| 16 | | sed -e s"/^/export /" \ |
---|
| 17 | | tr [\\\n] [\;] ) |
---|
| 18 | |
---|
| 19 | exec /opt/oar/current/bin/oarsh $HOST "$MYENV $@" |
---|
Note: See
TracBrowser
for help on using the repository browser.