The HEPiX Login Scripts Project Implementation at CERN Reference Guide Version 2.5.2

Arnaud Taddei gif


Abstract:

This document is a reference guide for the HEPiX login scripts project. It gives all the variables which are set by default at HEP and Site level, all the shell specific things which are done, the list of the files which can be used and for what purpose.


Contents

List of Tables


1 Introduction

This document is a reference technical paper for the HEPiX scripts.

In order to provide a common user environment on UNIX Systems a set of scripts was designed first by the DESY UNIX Commitee (DUX) (see [9] which obsoletes [2]).

These scripts are covering the user environment which includes the shell environment and will include the graphical environment (X11) in the future. The "startup scripts" (shell environment) provide a way for users to login, work in interactive and batch mode for the most common shells and platforms.

The following paper provides all files, environment and shell variables commands, options, aliases or functions, extra things which are provided by the HEPiX scripts and which can be customised.


2 Levels

 

The following levels are supported:

1 - HEP level,
2 - Site level (here it is CERN),
3 - System level,
4 - Cluster level,
5 - Group level,
6 - User level.

2.1 "Mechanical" aspects

If you installed the HEPiX scripts in mode 1 (see [11]), then when the shell reads the user dot files which should be the templates, it will source the central-files. The central-files will detect that the HEPiX scripts haven't been installed in enforced mode (mode 2) and they will start to execute all the levels beginning with the HEP level. If there are files at any level they will be sourced.

If you installed the HEPiX scripts in mode 2 (see [11]), the shell (the good ones!!) start reading the wrappers which test if you are allowed to go further. If yes, the shell will start the HEPiX scripts levels from the HEP level up to the end. Then the shell executes the user dot files and the user dot files will start sourcing the central-templates files. The latter will recognise that the HEPiX scripts have been executed already so they won't ``loop'' and the shell will execute the end of the user dot files.

Note: No level is mutually exclusive. The numbers show in what order are called the levels. A level with a number n can redefine anything which had been set had level n - 1. So the user can redefine everything.

2.2 "Conceptual" aspects

According to who you are you have the responsibility to maintain your environment at your level. For instance, if you are administering one machine you have the responsibility of the system level and you can ``play'' with any file in /etc/hepix.

Note: that the Cluster level looks like ``syntaxic suggar''.

2.3 List of files in each level

 

2.4 Who is using the HEPiX scripts?

It had been decided that (see [9]):

root never uses the HEP scripts,
all users with uid less than 100gif don't use the HEP scripts,
all users who have their username in /etc/hepix/list- don't use the HEP scripts.


3 Files

 

We have subdivided the scripts in several files according to the schemes used by tcsh and zsh because these shells provide the greatest flexibility to assign scripts to the different cases mentioned above.

3.1 HEP level

The HEP files are the main engine they are calling all the other files to provide the hooks to the Site level files, set some variables, etc.

HEP_csh.cshrc and HEP_zshenv
These two files are used to set the environment of the shell. They are mainly providing almost all the useful environment variables.

HEP_csh.login, HEP_profile and HEP_zprofile
These 3 files are providing the login part of the shell, setting the terminal line if connected to a terminal.

HEP_cshrc.rc, HEP_tcshrc, HEP_kshrc, HEP_bashrc and HEP_zshrc
These 5 files are setting some specific default for each shell. For instance, setting some options, some shell variables, some aliases and/or functions, etc.

3.2 Files at other levels

*sys.conf.[c]sh
These files are used to set ONLY the environment variables. There are two ``twin'' files for eboth C-shell and Bourne shell flavour and one is the translation of the other.

*env.[c]sh
These files are here to set the environnment part of the shell.

*aliases.[c]sh
These files are provided for you to give some aliases or functions.

*rc*
These files are here to put all other shell variables you need or other options, etc. which affect the behaviour of the shell itself.

*login.[c]sh
These files are provided for you to set everything which occurs at login time.

termset.[c]sh
These files are provided for term setting corrections

The following table shows the auxiliary files which are used to make the HEPiX scripts accessible.

The next table gives the names of the files for each shell flavour, at each level, which can be used to provide a customised environment which suites to your needs.

So if you want to provide a customisation for the C-shells on the machine you administer, you simply have to add lines in the files whose names are in the column System level and in the raw C-shell.

Thus you can customise your environment using the following files in /etc/hepix for the C-shells:

sys.conf.csh
env.csh
tcshrc
cshrc.rc
aliases.csh
login.csh

Moreover, the user can use templates files. In each newly created account all the templates files for the customisation of the shell are provided. Each user can edit these files using the examples described in the previous section to customise their environments.

In these templates the user will find 3 parts:

1 - the header part which gives the address mail in case of serious problems, the version number, the generation date, the authors, etc.

2 - the hook to the HEPiX scripts. This hook is not required if the HEPiX scripts are installed in enforced mode. The user should anyway NEVER remove these 3 lines for the C-shell users

if ( -r /usr/local/lib/hepix/central_env.csh ) then
        source /usr/local/lib/hepix/central_env.csh
endif
or the following lines for the Bourne-shells users:
if [ -r /usr/local/lib/hepix/central_env.sh ]; then
        . /usr/local/lib/hepix/central_env.sh
fi
There might be slightly different but should look like them.
3 - commented lines. All these lines can be uncommented. They give the user, examples of what they can do and this is their part. They can use it, remove it, update it as they wish.

These templates give other examples and, for tcsh or zsh shells, there are other related documents like [7], [3], [4], [5].


4 Environment variables

4.1 HEP level

4.2 Site level

4.3 Variables with default values - Example with AIX


5 Shell variables

5.1 HEP level

 

The protection of these files prevents the shell to loop, trying to ``re-execute'' the same files. It is usefully introduced to allow the installation mode 1 and mode 2 (see [11]).


6 Aliases and functions

6.1 Functions vs Aliases: Bourne and C-shell

6.2 HEP level

6.3 Site level

This last command resets your terminal.


7 Shell customisations

The following special interactive features of the shells will be enabled if possible:

For more special features see the manuals of these shells.

7.1 Bourne shell sh

7.2 C-shell csh

7.2.1 HEP level

7.2.2 Site level

The history file had been disabled.

7.3 Korn shell ksh

7.3.1 HEP level

The last 4 aliases enables the use of the arrow keys which is working in xterm but not in hpterm.

7.3.2 Site level

The history file had been disabled. The history is not cached anymore into a file but in separated temporary files per session which are removedat the end of the session. It avoids nasty ksh bugs.

7.4 Bourne Again shell bash

7.4.1 HEP level

7.4.2 Site level

7.5 Tenex C-shell tcsh

7.5.1 HEP level

7.5.2 Site level

The history file is disabled.

7.6 Z shell zsh

7.6.1 HEP level

Variables and parameters

Options.

7.6.2 Site level

The following options have been unset.


8 Others

 

8.1 copyright

8.2 motd

Because there are some connection programs on some systems which read the ``message of the day'' file (/etc/motd) it is not possible to standardise easily. The default behaviour is to put this file under /etc/hepix/motd.

8.3 quota-warn

This commands tells you, the user, if you are ``exceeding'' your ``disk space'' quota limit. In order to have a feeling you can try:

> /usr/local/lib/hepix/quota-warn 10

Which means that if your quota will exceed 10

You can use this command in the LOGIN part of your login dot files (.profile, .zprofile, .login, etc.).


9 Configuration of software tools

 

9.1 newsreaders

One variable which should be set is the NNTPSERVER which indicates which server should be contacted for news reading, posting, etc. This variable is used by all known newsreaders.

For example, one could include the following line

        setenv NNTPSERVER news.cern.ch
in the file /etc/hepix/sys.conf.csh.

9.2 Mosaic

One example of a variable which can be set for Mosaic is the WWW_HOME variable. This variable could be made group dependent for example.

setenv WWW_HOME http://www1.cern.ch

9.3 The Browser less

You may define your own less commands by using the program lesskey to create a file called ".less" . This file specifies a set of command keys and an action associated with each key. The key bindings for less can be loaded with the -k option.

setenv LESS "-e -i -M -w -k/usr/local/lib/less/.less"
For the explanation of the other options consult the man page for less.

9.4 Oracle

The oracle environment is available. It can be set from the user recommended templates by uncommenting a few lines.

It provides a list of variables which are mandatory to work with oracle and to access the database. As it is not available on all the platforms, you won't get it everywhere. Consult the Oracle support group for more information.


Annex A - Unix commands

 

All the commands which are used by the HEPiX srcipts given in alphabetic order in each table.

9.5 The shells

Read 162 for a comparison between shells and 163 for a tutorial about tcsh and zsh. The document 168 shows the differnent startup files used by shells.

9.6 Commands used by the HEP level

9.6.1 Vital commands

9.6.2 Less vital commands

9.7 Commmands needed at Site level


Annex B - Debug mode for all the shells

 

I got the following graphs on an IBM AIX v. 3.2 (@sys='rs_aix32').

Sequence of files called for csh.

Sequence of files called for tcsh.

Sequence of files called for sh.

Sequence of files called for ksh.

Sequence of files called for bash.

Sequence of files called for zsh.


Annex C - Debug mode for csh for all the supported machines

 

Sequence of files called for csh on AIX.

Sequence of files called for csh on HP-UX.

Sequence of files called for csh on Solaris.

Sequence of files called for csh on Digital Unix.

Sequence of files called for csh on Silicon Graphics IRIX.

Sequence of files called for csh on SunOS.

Sequence of files called for csh on ULTRIX.


Annex D - Correspondance table of the AFS platforms naming scheme

 


References

1
Philippe Defert, Alain Peyrat, and Ignacio Reguero. ASIS - User's and Reference Guide. Guide CN/CO/152, CERN, Geneva, April 1995. Version 3.00.

2
Axel Köhler and Arnaud Taddei. Proposal for a Common Script and X environment at DESY and CERN . Guide CN/DCI/168, CERN, Geneva, April 1994.

3
Arnaud Taddei. Customising your shell - tcsh specific . Guide CN/DCI/172, CERN, Geneva, April 1994.

4
Arnaud Taddei. Customising your shell - zsh options . Guide CN/DCI/171, CERN, Geneva, April 1994.

5
Arnaud Taddei. Customising your shell - zsh specific . Guide CN/DCI/175, CERN, Geneva, April 1994.

6
Arnaud Taddei. Shell-Choice - A Shell Comparison . Guide CN/DCI/162, CERN, Geneva, April 1994.

7
Arnaud Taddei. Shell Support - tcsh and zsh for pedestrians . Guide CN/DCI/163, CERN, Geneva, April 1994.

8
Arnaud Taddei. Should I have a dot ('.') in my PATH . Guide CN/DCI/170, CERN, Geneva, 1994.

9
Arnaud Taddei. HEPiX Login Scripts Project - Implementation at CERN: Concepts. Guide, CERN, Geneva, April 1995.

10
Arnaud Taddei. HEPiX Login Scripts Project - Implementation at CERN: Reference Guide. Guide, CERN, Geneva, April 1995.

11
Arnaud Taddei. HEPiX Login Scripts Project - Implementation at CERN: System Administrators Guide. Guide, CERN, Geneva, April 1995.

12
Arnaud Taddei. HEPiX Login Scripts Project - Implementation at CERN: User Guide . Guide, CERN, Geneva, April 1995.

13
Rainer Többicke. SUE. Specifications, CERN, Geneva, April 1995. Version 1.0.


This document had been translated from LaTeX source using the command:
latex2html -split 0 -t "HEPiX Login Scripts - Implementation at CERN: ReferenceGuide" -no_navigation -info "" -show_section_numbers referenceguide.tex

...Taddei
CERN - Arnaud.Taddei@cern.ch

...100
At CERN, the following convention stands: all users with a uid less than 100 are not considered as real users.



Arnaud Taddei
Fri May 12 13:41:58 METDST 1995