#!/bin/sh
# --------------------------------------------------------------------------
# Copyright 1992 by Forschungszentrum Informatik (FZI)
#
# You can use and distribute this software under the terms of the license
# version 1 you should have received along with this software.
# If not or if you want additional information, write to
# Forschungszentrum Informatik, "STONE", Haid-und-Neu-Strasse 10-14,
# D-76131 Karlsruhe, Germany.
# --------------------------------------------------------------------------
# 'obst-cnt - 27:02:91 - Dietmar Theobald'
#
# obst-cnt
#
# OBST psm facility.
#
[ -n "$OBSTdir" ] || { OBSTdir="`cd \`dirname $0\`;pwd`/"; export OBSTdir; }

          self='obst-cnt'
sync_container=2

if [ -z "$OBSTCONTAINER" -a -z "$SOSCONTAINER" ] ; then
  echo >&2 "*** $self: environment variable OBSTCONTAINER not defined"
  exit 1
fi

# cnt doesn't work for the SYNC_CONTAINER
if [ -n "`ls $sync_container 2>/dev/null`" ]; then
   echo >&2 "*** $self: not allowed on SYNC_CONTAINER ($sync_container)"
   exit 1
fi

${OBSTdir}cnt $*
