Overview
LRIS software is installed in two different architectures: Solaris and Linux. There are two kroot directories. Scripts that run on linux and Solaris have different kroot directories. In what follows we describe the procedure to update scripts and put them on svn.
There are two script types that may be modified. Scripts other than
those written in Perl may have any name convention. Perl
script should have a file suffix of ".sin" and contain in the
first line an alias for perl (see the template example below).
Procedure for modifying software in the kroot directory tree for LRIS.
LINUX
All LRIS Linux hosts will run the kroot installed from the lrisbuild
virtual machine. To make changes, one would:
- start xterm and do ssh -l lrisbld lrisbuild
- cd $KROOT/src
- use "lwhich scriptname" to determine the released path which should show you where to make mods in the
development area.
- Example: if lwhich scriptname returns
/kroot/bin/lris_init -> ..//Versions/kss/lris/lris_sh/scripts/inst/default/lris_init, then simply cd lris_sh/scripts/inst
If modifing an existing script, modify the script or its
corresponding *.sin file.
If creating a new script:
- copy the template files (see below) to a new file.
- Edit the makefile in that script directory to
include the new script in compilation. If it is a perl script, the script in the makefile should not include
the ".sin" suffix.
use make install wherever you changed something
Test whatever it is you installed. Anything
that just uses keywords (like scripts) will
run just fine on the build host.
When you
feel like saving your progress make sure to issue svn commit
When you are ready to deploy your changes to
the rest of the Linux hosts-- lris, lrismonored--
you need to kdeploy -a
Now check that the script works in the released code. Run it as
lriseng and a numbered account on lris.
Solaris
The procedure for manuka is simpler in one respect and more complicated
in another. There is no concept of deployment because it's a Solaris
machine; you don't have direct svn access for the same reason.
To install and test changes, you start with:
- ssh -l lrisdev manuka
- cd $KROOT/src
- make changes, probably in kss/lris and
make install wherever you changed something
- Once your changes are installed you're already "deployed" to
production. There is no second step! When you are ready to commit
changes you need to use a second host with NFS access to manuka.
- ssh -l lrisdev vm-svnclient
- cd svn/manuka
- cd to whatever subdirectory you made changes in above
svn commit
- Likewise, if you need to pull updates, you would svn update
instead of 'commit'. Once you pull updates you would go back to
manuka and install them.
Script Template for non perl scripts
Template below is found in the ~lris_sh dir.
#!/usr/local/bin/tcsh -f
#
# Name:
# script_template
#
# Purpose:
#
#
# Usage:
#
# where:
#
#
# Output:
#
#
# Modification history:
# 2000-Jul-25 MK template version
#-----------------------------------------------------------------------
# if debugging, do not make motor moves...
if ( "$1" == "-debug" ) then
echo "Entering DEBUG MODE!"
echo ""
shift
endif
exit
Perl Script Template
Template below is found in the ~lris_sh dir.
#!@PERL@ -w
#+
# NAME: template
#
# Purpose:
# Do nothing but provide a template for future use.
#
# Usage:
# template -debug
#
# Arguments:
# -debug = debug mode
#
# Output:
# to STDOUT
#
# Restrictions:
# none
#
# Exit values:
#
# Example:
#
# Modification history:
# 2006-Dec-20 MK template version
#-----------------------------------------------------------------------
# check for -verbose flag...
global verbose
set verbose 0
if { [lsearch -regexp $argv {^-v}] > -1 } {
set verbose 1
}
# check for -debug flag...
global debug
set debug 0
if { [lsearch -regexp $argv {^-d}] > -1 } {
set debug 1
set verbose 1
}
if { $debug }{echo "DEBUG MODE"}
if { $verbose } {echo "Verbose triggered"}