#!/usr/bin/ksh
#
# This script configues a SCRAP test system as an isolated DCE cell.

export CELL_NAME=pddev_scrap
export MASTER_KEY=vesta
export DCE_PASSWD=pddev
export CELL_ADMIN=cell_admin
export UID_LLIMIT=5000
export GID_LLIMIT=500
export DCE_ORG=pddev_scratch_org

# NOT_A_TTY, this variable suppresses the calls to
export NOT_A_TTY=1

if [[ ! -x /opt/dce/bin/dce_config ]]
then
   print
   print "ERROR: Cannot execute /opt/dce/bin/dce_config.  "
   print "Exiting without cell configuration. "
   exit 1
fi

if [[ ! -x /opt/pd/bin/pddcesetup ]]
then
   print
   print "ERROR: Cannot execute /opt/pd/bin/pddcesetup.  "
   print "Exiting without cell configuration. "
   exit 1
fi

#
# Do not edit below this line
/opt/dce/bin/dce_config <<.
 1
1
1
y
$CELL_NAME
$MASTER_KEY

$DCE_PASSWD
$DCE_PASSWD
$UID_LLIMIT
$GID_LLIMIT
2

3
1
99
.
dce_login $CELL_ADMIN $DCE_PASSWD -e /opt/pd/bin/pddcesetup <<.
y
y
$DCE_ORG
$DCE_PASSWD
$DCE_PASSWD
$DCE_PASSWD
$DCE_PASSWD
$DCE_PASSWD
.
