[GE users] login shells (revisited)

Boone J. Severson severson at cray.com
Mon Sep 13 19:03:12 BST 2004

I've searched the archives, and I think I have a handle on why the 
problem exists but was unable to obtain a "generic" solution.

The following command will be treated as a login to a system on the 
grid. It would appear that the shell specified in YP is used, so csh 
users have their .cshrc sourced, same with tcsh (.tcshrc), ksh 
(.profile), and bash (.bashrc). It behaves as "ssh <hostname>" would.
% qrsh -l arch=x86_64

The following command is not treated as a login, so if it is a script 
executes binaries located in a special PATH set in a users .rc file, or 
other such environment variables, it would fail because the 
.*rc/.profile files are not sourced.
% qrsh -l arch=x86_64 name_of_script

Do scripts have to be rewritten to duplicate what's seen in when 
sourcing a login script (but converted to csh syntax if the normal shell 
is ksh/bash), or is there an SGE setting that will force qrsh to log in 
regardless? I got the impression that changing SGE from posix_behavior 
to unix_behavior might help assuming the scripts had #!/bin/<shell> 
<login_command_line_switch> which for bash is "#!/bin/bash -l" (I 
think). The bummer here is that now the script is hardcoded to login to 
a certain shell, and people here use ksh, csh, tcsh, and bash. There 
would have to be 4 versions of the script depending on what shell people 
used or else everyone would have to maintain .*rc files for all 4 
shells. Is there a generic solution to make qrsh log in no matter how it 
was used?

If it helps, this is 5.3p4.

I appreciate any help someone can offer.


To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net

More information about the gridengine-users mailing list