#!/bin/sh
#
# $Id: master 1119 2005-01-25 14:21:45Z jorge $
#

if [ ! $DRQUEUE_ROOT ]; then
  echo ERROR: DRQUEUE_ROOT not set in environment
  exit 1
fi

if [ ! $DRQUEUE_MASTER ]; then
  echo ERROR: DRQUEUE_MASTER not set in environment
  exit 2
fi

MASTER_CMD=$DRQUEUE_ROOT/bin/master.`uname -s`

if [ ! -x $MASTER_CMD ]; then
  echo ERROR: master for your platform \(master.`uname -s`\) does not exist in $DRQUEUE_ROOT/bin.
  echo Perhaps you did not install it \(make miniinstall or make install\).
  exit 3
fi

$MASTER_CMD $*
