"_bindir: Undefined variable." when using csh


Issue:  When using csh as your shell, torque will try to run the torque.csh script that is installed with the torque-mom and torque-client packages.  This script tries to use _bindir and _sbindir environment variables, which are undefined.  This results in an error when the script runs.

 

Solution:  This is a bug that is being worked on, so the script will work out of the box.  Before the fix is available you can work around the problem by defining these variables in the script.  There is also a typo in the script where it needs a space between the 'test' and '-d' on the last line.  If you modify the script to look like this it should work:

#!/bin/csh
setenv _bindir /usr/local/bin
setenv _sbindir /usr/local/sbin
test -d ${_bindir} && setenv PATH /usr/local/bin:${PATH}
test ´id -u´ = 0 && test -d ${_sbindir} && setenv PATH /usr/local/sbin:${PATH}
Tags: csh, define, env, path, shell
Last update:
2017-01-24 16:18
Author:
Ben Roberts
Revision:
1.0
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.

Records in this category

Tags