~ubuntu-branches/debian/jessie/eso-midas/jessie

« back to all changes in this revision

Viewing changes to system/unix/drs

  • Committer: Package Import Robot
  • Author(s): Ole Streicher
  • Date: 2014-04-22 14:44:58 UTC
  • Revision ID: package-import@ubuntu.com-20140422144458-okiwi1assxkkiz39
Tags: upstream-13.09pl1.2+dfsg
ImportĀ upstreamĀ versionĀ 13.09pl1.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh 
 
2
#
 
3
# Assign the necessary logical names for Midas
 
4
# needed for the Unix command `drs'
 
5
# Klaus Banse ESO - DMD                000503
 
6
 
7
# 071108        last modif
 
8
 
9
#**************************************************************************
 
10
# Configure Here:
 
11
# ---------------
 
12
# Modify the default values of MIDASHOME0 and MIDVERS0
 
13
# accordingly to your site.
 
14
#
 
15
MIDASHOME0=/midas
 
16
MIDVERS0=07SEP
 
17
#
 
18
# Environment variables MIDASHOME and MIDVERS overwrite the defaults above
 
19
#
 
20
#**************************************************************************
 
21
 
 
22
## set -x 
 
23
 
 
24
#
 
25
# If MIDASHOME variable not defined then set to default.
 
26
#
 
27
if [ -z "$MIDASHOME" ]; then
 
28
   MIDASHOME="$MIDASHOME0"; export MIDASHOME
 
29
fi
 
30
 
 
31
#
 
32
# If MIDVERS variable not defined then set to default.
 
33
#
 
34
if [ -z "$MIDVERS" ]; then
 
35
   MIDVERS="$MIDVERS0"; export MIDVERS
 
36
fi
 
37
 
 
38
#
 
39
# Check access to directories and files
 
40
#
 
41
if [ ! -d $MIDASHOME/$MIDVERS ]; then
 
42
  echo "$MIDASHOME/${MIDVERS}: not such directory."
 
43
  echo "Call your MIDAS operator. EXIT."
 
44
  exit 1
 
45
fi
 
46
 
 
47
#
 
48
# if necessary create MIDAS work directory
 
49
#
 
50
if [ -z "$MID_WORK" ]; then
 
51
   MID_WORK=$HOME/midwork/ ; export MID_WORK
 
52
fi
 
53
 
 
54
#
 
55
# get all the variables (logical names)
 
56
#
 
57
if [ -f $MIDASHOME/$MIDVERS/monit/midlogs.sh ]; then
 
58
  . $MIDASHOME/$MIDVERS/monit/midlogs.sh
 
59
else
 
60
  echo "$MIDASHOME/$MIDVERS/monit/midlogs.sh not such file."
 
61
  echo "Call your MIDAS operator. EXIT."
 
62
  exit 1
 
63
fi
 
64
 
 
65
#
 
66
# Catch any possible interrupt and remove the lock file
 
67
#
 
68
trap "exit 1" 1 3 15
 
69
 
 
70
#
 
71
# Set PATH for shared libraries
 
72
#
 
73
os=`uname`
 
74
case "$os" in
 
75
    "SunOS"|"Linux")
 
76
        if [ -z "$LD_LIBRARY_PATH" ] ; then
 
77
          LD_LIBRARY_PATH=$MIDASHOME/$MIDVERS/lib
 
78
        else
 
79
          LD_LIBRARY_PATH=$MIDASHOME/$MIDVERS/lib:$LD_LIBRARY_PATH
 
80
        fi
 
81
        export LD_LIBRARY_PATH
 
82
        ;;
 
83
    "HP-UX")
 
84
        if [ -z "$SHLIB_PATH" ] ; then
 
85
          SHLIB_PATH=$MIDASHOME/$MIDVERS/lib
 
86
        else
 
87
          SHLIB_PATH=$MIDASHOME/$MIDVERS/lib:$SHLIB_PATH
 
88
        fi
 
89
        export SHLIB_PATH
 
90
        ;;
 
91
     *)
 
92
        ;;
 
93
esac
 
94
 
 
95
# run QREQA
 
96
#
 
97
DAZUNIT=01; export DAZUNIT                      # must be 01 ...
 
98
MIDAS_OUTSIDE=YES; export MIDAS_OUTSIDE
 
99
$MID_MONIT/qreqa.exe $*
 
100
 
 
101
exit 0