Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 Configuration Guide


13.4.2 Changing the login scripts

This subsection describes how to change the login scripts.

Organization of this subsection

(1) For Unix jobs and HTTP connection jobs

In JP1/AJS3, before a Unix job or an HTTP connection job is executed, login scripts are executed based on the shell as follows:#

#

There might be some differences depending on the OS type. For details, check the documentation for the applicable OS.

Therefore, if the login scripts contain the echo, cat, or another command that sends information to the standard output file, text other than the job execution result is output to the standard output file. In addition, if the stty, tty, tset, or script command, which requires an interactive environment, is executed in a login script, the job might terminate abnormally. In cases such as this, change the login script so that these commands are not executed.

For other login scripts loaded into the shell, verify their operation in the relevant OS.

For example, if you are using sh, ksh and bash, you must add the shaded parts shown in the following figure to the login scripts for sh.

[Figure]

If you are using csh, similarly, add the shaded parts shown in the following figure to the login scripts for csh.

[Figure]

Supplementary note:

In AIX, the information in /etc/environment cannot be inherited. Change the applicable login scripts as shown in the following example:

if [ "$JP1JobID" != "" ] ; then
. /etc/environment
export environment-variable-to-set
fi

After /etc/environment is loaded, execute the export command for the environment variables to be set.

Important

The above setting is valid only for sh, ksh and bash (.profile), and is not valid for csh and other shells. Also note that specifying the above setting might change the order in which settings are specified in a login script because /etc/environment is loaded in the login script. Carefully check the position at which /etc/environment is to be added, and verify that environment variables set by /etc/environment are also set in the login script.

We recommend that you edit the login script so that /etc/environment is loaded at the beginning of the script.

(2) For flexible jobs

If a login script in a destination agent includes any of the commands listed below, edit the login script so that none of these commands will be executed. Note that when a flexible job executes a login script, the job sets a value for the AJSENV environment variable and does not set a value for the JP1JobID environment variable. You can determine whether a flexible job is executing a login script by checking the values of these environment variables.