Requirements for development and production host login environment definition


Greg White, JingChen Zhou



This document describes proposed functional changes to the login and startup environment of SLAC accelerator production unix hosts (gateways and slcs machines), and in particular the cddev userid used to run SLAC accelerator control system processes.



At present, the startup files on production machine (which are on local disks in /etc/) contain hard coded filename paths, eg:


/etc/rc3.d/s99st.gateway2leb calls ->

/afs/slac/g/cd/soft/ref/app/script/st.gateway2.leb calls -> /afs/slac/g/pepii/ctrl/prod/bin/solaris/epicsSetupLeb calls ->

/afs/slac/g/pepii/ctrl/prod/bin/solaris/epicsSetupNlcta calls ->



and epicsSetup actually does the “set path”.


This means

  1. it’s hard to move scripts from one area to another, because other scripts refer to them by absolute pathname, so those other scripts will break if the original is moved.
  2. it’s hard to manage or limit the directories binary and scripts are placed, since programmers are free to put script and code anywhere they want – and that makes it impossible to devise a release escalation scheme, because there is no well defined set of directories that define the release hierarchy (like dev/, new/ prod/ and so on), and there is no clearly defined place from which executable code should be moved from a development to production machines.



We propose that the startup sequence of the production machines includes a stage in which a PATH variable is set, to tell the startup sequence where to look for startup process files and the scripts and binaries to run as part of the startup process.


User logins on both development and production machines would share the same PATH and environment definition as far as possible also. All startup process scripts will be moved to a single place.

In Outline

This PATH setup will have to be near the beginning of the startup sequence, since it will define the directories from which other scripts and binaries must be started.


Additionally, a “default” system environment for such things as EPICS and AIDA development should be set up by each kind of startup.


Systematic Requirements

The PATH defined by pathSetup must include a search list of directories in which to look for scripts and binaries. The directories so defined will be different on development and production machines.

On development:


On development the search list will be defined by 3 new environment variables:

[ setenv CD_SOFT  /afs/slac/g/cd/soft –already defined ]

setenv CD_DEV     $CD_SOFT/dev

setenv CD_NEW     $CD_SOFT/new

setenv CD_PROD    $CD_SOFT/prod


PATH will therefore be defined to include (after all utilities and tools):

setenv PATH {PATH} $CD_DEV/script; $CD_DEV/@sys/bin; $CD_NEW/script; $CD_NEW/@sys/bin; $CD_PROD/script; $CD_PROD/@sys/bin


On Production: