I'm having trouble running Korn scripts on my cluster after installing OSCAR. It seems switcher is doing some strange things to the environment. Is this normal or not? Here is my situation.
If the ENV environment variable is set I get strange errors every time /bin/ksh runs whether it is from a script or directly from the command line, interactively. [r...@helios bin]# ksh ksh: /etc/bashrc[38]: shopt: not found ksh: /etc/bashrc[47]: shopt: not found # I also wrote a simple script, "go" to troubleshoot this problem. [r...@helios bin]# cat go #!/bin/ksh echo "ENV = $ENV" echo "pwd = " `pwd` echo "PWD Variable = $PWD" echo "Current Path = $PATH" cat $1 echo echo "Changing to /" cd / echo "ENV = $ENV" echo "pwd = " `pwd` echo "PWD Variable = $PWD" echo "Current Path = $PATH" cat $1 echo echo "Changing to home directory" cd echo "ENV = $ENV" echo "pwd = " `pwd` echo "PWD Variable = $PWD" echo "Current Path = $PATH" cat $1 If I unset the environment variable $ENV then things work as expected, but I think it's the switcher program that is managing that variable. You can see from the output below that my pwd changes when the script is executed while the variable is set and that bashrc is getting sourced when ksh starts. If I unset the variable before running the script it doesn't drop to the home directory when it starts and it finds the "text" file which is sitting in the same directory as the script itself. I think the heart of this problem is that .bashrc is getting sourced. I just don't know if that is intended or not. I don't know how OSCAR wants things configured. [r...@helios bin]# pwd && go text /root/bin /root/bin/go: /etc/bashrc[38]: shopt: not found /root/bin/go: /etc/bashrc[47]: shopt: not found ENV = /root/.bashrc pwd = /root PWD Variable = /root Current Path = /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/opt/env-switcher/bin:/opt/pvm3/lib:/opt/pvm3/lib/LINUX64:/opt/pvm3/bin/LINUX64:/opt/pbs/bin:/opt/pbs/lib/xpbs/bin:/opt/c3-4/:/root/bin cat: text: No such file or directory Changing to / ENV = /root/.bashrc pwd = / PWD Variable = / Current Path = /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/opt/env-switcher/bin:/opt/pvm3/lib:/opt/pvm3/lib/LINUX64:/opt/pvm3/bin/LINUX64:/opt/pbs/bin:/opt/pbs/lib/xpbs/bin:/opt/c3-4/:/root/bin cat: text: No such file or directory Changing to home directory ENV = /root/.bashrc pwd = /root PWD Variable = /root Current Path = /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/opt/env-switcher/bin:/opt/pvm3/lib:/opt/pvm3/lib/LINUX64:/opt/pvm3/bin/LINUX64:/opt/pbs/bin:/opt/pbs/lib/xpbs/bin:/opt/c3-4/:/root/bin cat: text: No such file or directory [r...@helios bin]# unset ENV && pwd && go text /root/bin ENV = pwd = /root/bin PWD Variable = /root/bin Current Path = /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/opt/env-switcher/bin:/opt/pvm3/lib:/opt/pvm3/lib/LINUX64:/opt/pvm3/bin/LINUX64:/opt/pbs/bin:/opt/pbs/lib/xpbs/bin:/opt/c3-4/:/root/bin this is some text Changing to / ENV = pwd = / PWD Variable = / Current Path = /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/opt/env-switcher/bin:/opt/pvm3/lib:/opt/pvm3/lib/LINUX64:/opt/pvm3/bin/LINUX64:/opt/pbs/bin:/opt/pbs/lib/xpbs/bin:/opt/c3-4/:/root/bin cat: text: No such file or directory Changing to home directory ENV = pwd = /root PWD Variable = /root Current Path = /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/opt/env-switcher/bin:/opt/pvm3/lib:/opt/pvm3/lib/LINUX64:/opt/pvm3/bin/LINUX64:/opt/pbs/bin:/opt/pbs/lib/xpbs/bin:/opt/c3-4/:/root/bin cat: text: No such file or directory ~Dale -- Dale Schuster Systems Administrator Sierra Nevada Corporation Information Systems ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Oscar-users mailing list Oscar-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oscar-users