I am currently in the process of configuring Open Grid Scheduler in FreeBSD. As part of this process I need to set the environmental variable
To do this I have been experimenting with attempting to set this value through the root account's
~/.profile since this account has been configured to use the Bourne shell as it's default shell. I have exported
SGE_ROOT as follows:
However upon logging into the root shell with
SGE_ROOT configured in it's
~/.profile it would seem that this method of setting the environment variable doesn't work since running the command
env returns the following:
SUDO_COMMAND=/usr/bin/su LOGNAME=root MAIL=/var/mail/root PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/ec2-user/bin:/usr/local/sge/bin/fbsd-amd64 SUDO_GID=1001 PWD=/usr/home/ec2-user TERM=xterm HOME=/root USER=root SHELL=/bin/sh SUDO_USER=ec2-user SUDO_UID=1001 USERNAME=root
I do however notice that the
PATH variable which I have also configured via root's
~/.profile to include the Open Grid Scheduler binaries would seem to have been successfully set.
I have also found that performing the same configuration in non-root accounts on the same machine succeeds in setting the environmental variable. In addition, exporting the value in the global
/etc/profile seems to produce the same behaviour.
I am therefore wondering if perhaps there is a better way of setting this variable for the root account under the Bourne shell?
I understand that it would probably be easier to use tcsh as root's default shell, as this is typically how FreeBSD is configured. However I have thus far had to compile Open Grid Scheduler without support for tcsh due to issues with
utmp.h no longer being available in FreeBSD.