File:  [TIS-4000 Rel T60] / scripts / installTis4000
Revision 1.9: download - view: text, annotated - select for diffs
Mon Feb 5 21:23:32 2001 UTC (16 years, 10 months ago) by tis4000
Branches: MAIN
CVS tags: HEAD, Duluth_baseline
Remove modification of limitorque. - ncd

#!/bin/sh
#		
################       				##################
########						##########
#			installTis4000
#
#	Unix Shell script to install or update tis4000
#	for LMC t60 release.
#
#	Requirements: must be executed as ROOT
#
#	Modified
#	2/2/01		ncd	Removed modification of limitorque.
#	1/31/01		ncd	Assigned destdir and targetIOC.
#				Removed torTasks question.
#				LMC specific.
#	1/11/01		ncd	Change directory path of copies.
#				Add modification of limitorque.	
#	11/29/00	ncd	Added new or update option.
#				Added chmod of java files.
#
########						##########
################				##################
#
echo
echo "This script will copy the distribution structure for the t60 "
echo "release to a specified destination directory. Please execute "
echo "                  with root privileges.                      "
echo
echo "If this is an upgrade from a previous installation, you will "
echo "be prompted as to which directories you want to replace. If  "
echo "you are replacing directories that contain project specific  "
echo "files, move these files to a safe place before proceeding.   "
echo
#
until [ "$begin" = n ] || [ "$begin" = y ]
do
 echo "Continue? y/n: "
 read begin
 echo
done
#
if [ $begin = y ]
then
  until [ "$new" = n ] || [ "$new" = y ]
  do
   echo "Is this a new installation? y/n: "
   read new
   echo
  done
#
  destdir=/export/home/tis4000
  targetIOC=M30
#
  if [ $new = n ]
  then
    echo
    echo "Replace the apple directory? y/n "
    read ap
    if [ $ap = y ]
    then
      cp -pr ./tis4000/apple $destdir
    fi
#
    echo
    echo "Replace the tasks directory? y/n "
    read task
    if [ $task = y ]
    then
      cp -pr ./tis4000/tasks $destdir
    fi
#
    echo
    echo "Replace the torTasks2 directory? y/n "
    read tor2
    if [ $tor2 = y ]
    then
     cp -pr ./tis4000/torTasks2 $destdir
    fi
#
    echo
    echo "Replace the axhome directory? y/n "
    read ax
    if [ $ax = y ]
    then
      cp -pr ./tis4000/axhome $destdir
    fi
#
    echo
    echo "Replace the snl directory? y/n "
    read sn
    if [ $sn = y ]
    then
      cp -pr ./tis4000/snl $destdir
    fi
#
    echo
    echo "Replace the temp directory? y/n "
    read tm
    if [ $tm = y ]
    then
      cp -pr ./tis4000/temp $destdir
    fi
#
    echo
    echo "Replace the graphics directory? y/n "
    read gr
    if [ $gr = y ]
    then
      cp -pr ./tis4000/graphics $destdir
    fi
#   
  else
    mkdir $destdir
    echo 
    echo "Copying TIS4000 subtrees from distribution to $destdir"
    echo 
    cp -pr ./tis4000/* $destdir
    echo "Copying support directories from distribution to $destdir"
    #cp -pr ./usr /
    cp -pr ./galaxy /
    echo "Copying rc.tisstart to /etc/init.d"
    cp -p $destdir/tasks/rc.tisstart /etc/init.d
    echo "Copying rc.tisstop to /etc/init.d"
    cp -p $destdir/tasks/rc.tisstop /etc/init.d
  fi
#
  echo "Setting ownership and run as user bits on privileged files"
  chown root $destdir/tasks/lynks_rsa_srv $destdir/tasks/netTimeClient  $destdir/tasks/netTime $destdir/tasks/tisTime
  chmod +s   $destdir/tasks/lynks_rsa_srv $destdir/tasks/netTimeClient  $destdir/tasks/netTime $destdir/tasks/tisTime
  chown root $destdir/tasks/timeServer
  chmod +s   $destdir/tasks/timeServer
  chown root $destdir/tasks/png2
  chmod +s   $destdir/tasks/png2
  chown root $destdir/tasks/rerouted
  chmod +s   $destdir/tasks/rerouted
#
  echo "Setting exec on scripts"
  chmod +x $destdir/tasks/start_TIS $destdir/tasks/stop_TIS $destdir/tasks/tistasks $destdir/tasks/starttis4000
  chmod +x $destdir/tasks/startJava $destdir/tasks/stopJava
  chmod +x $destdir/tasks/*.sh
#
  echo "Creating lock directories required by the system"
  mkdir $destdir/tasks/caC
  mkdir $destdir/tasks/nmS
  mkdir $destdir/tasks/scM
  mkdir $destdir/tasks/dbC
  mkdir $destdir/tasks/keys
#
  echo "Changing ownership of lock directories"  
  chown tis4000 $destdir/tasks/caC  
  chgrp staff $destdir/tasks/caC  
  chown tis4000 $destdir/tasks/nmS  
  chgrp staff $destdir/tasks/nmS  
  chown tis4000 $destdir/tasks/scM
  chgrp staff $destdir/tasks/scM  
  chown tis4000 $destdir/tasks/dbC  
  chgrp staff $destdir/tasks/dbC
  chown tis4000 $destdir/tasks/keys
  chgrp staff $destdir/tasks/keys
# 
  echo
  echo "Linking in rc3.d"
  ln -s /etc/init.d/rc.tisstart /etc/rc3.d/S99rc.tisstart 
  ln -s /etc/init.d/rc.tisstop /etc/rc2.d/K10rc.tisstop 
  ln -s /etc/init.d/rc.tisstop /etc/rc1.d/K10rc.tisstop 
  ln -s /etc/init.d/rc.tisstop /etc/rc0.d/K10rc.tisstop 
#
  echo 
  echo "Creating links required by the system"
  rm /tis4000
  ln -s $destdir /tis4000
  rm /tis4000db
  ln -s $destdir/apple /tis4000db
  ln -s $destdir/tasks/default.dctsdr /$destdir/apple/default.dctsdr
  ln -s $destdir/tasks/pdbxref.dbf /$destdir/apple/pdbxref.dbf
  ln -s $destdir/tasks/pdbxref.mdx /$destdir/apple/pdbxref.mdx
# Sequencer compilers
  ln -s $destdir/tasks/compilers/$targetIOC/ar $destdir/snl/ar
  ln -s $destdir/tasks/compilers/$targetIOC/as $destdir/snl/as
  ln -s $destdir/tasks/compilers/$targetIOC/cc1 $destdir/snl/cc1
  ln -s $destdir/tasks/compilers/$targetIOC/cc1 $destdir/snl/cc1plus
  ln -s $destdir/tasks/compilers/$targetIOC/cpp $destdir/snl/cpp
  ln -s $destdir/tasks/compilers/$targetIOC/gcc $destdir/snl/gcc
  ln -s $destdir/tasks/compilers/$targetIOC/ld $destdir/snl/ld
  ln -s $destdir/tasks/compilers/$targetIOC/nm $destdir/snl/nm
  ln -s $destdir/tasks/compilers/$targetIOC/ranlib $destdir/snl/ranlib
  ln -s $destdir/tasks/compilers/$targetIOC/strip $destdir/snl/strip
# User defined block compilers
  ln -s $destdir/tasks/compilers/$targetIOC/ar $destdir/udb/ar
  ln -s $destdir/tasks/compilers/$targetIOC/as $destdir/udb/as
  ln -s $destdir/tasks/compilers/$targetIOC/cc1 $destdir/udb/cc1
  ln -s $destdir/tasks/compilers/$targetIOC/cc1 $destdir/udb/cc1plus
  ln -s $destdir/tasks/compilers/$targetIOC/cpp $destdir/udb/cpp
  ln -s $destdir/tasks/compilers/$targetIOC/gcc $destdir/udb/gcc
  ln -s $destdir/tasks/compilers/$targetIOC/ld $destdir/udb/ld
  ln -s $destdir/tasks/compilers/$targetIOC/nm $destdir/udb/nm
  ln -s $destdir/tasks/compilers/$targetIOC/ranlib $destdir/udb/ranlib
  ln -s $destdir/tasks/compilers/$targetIOC/strip $destdir/udb/strip
# applix
  echo
  echo "Is Oracle installed on this release? y/n "
  read oracle
  if [ $oracle = y ]
  then
    ln -s $destdir/tasks/apxOracleDispatch $destdir/axhome/macros/apxDispatch
  else
    ln -s $destdir/tasks/apxDispatch $destdir/axhome/macros/apxDispatch
  fi 
  ln -s $destdir/tasks/apxfunc.h $destdir/axhome/macros/apxfunc.h
  ln -s $destdir/tasks/login.am $destdir/axhome/macros/login.am
  ln -s $destdir/tasks/report.am $destdir/axhome/macros/report.am
  ln -s $destdir/tasks/tisMacros.am $destdir/axhome/macros/tisMacros.am
  ln -s $destdir/tasks/save_report2.am $destdir/axhome/macros/save_report2.am
# java
  ln -s $destdir/tasks/libcb.so /usr/lib/libcb.so
# graphics
  echo 
  echo "Creating standard graphic files from supplied adl files"
  for filename in `ls $destdir/graphics/adls | awk '{ FS = ".adl"; print $1 }'`
  do
    /tis4000/tasks/edd -d $destdir/graphics/adls/$filename.adl $destdir/graphics/$filename.dl
  done
else
  echo "Exitting Script"  
fi

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>