# postinstall script for DCG/x installation
# Copyright Data Connection Ltd. 1997-1998
#
# register the update of an installed file
#
installf $PKGINST $BASEDIR/etc/opt/SUNWdat/config/dcgx f || exit 2
# change the site name to the hostname
echo "Changing site name to "`hostname`
cd $BASEDIR/etc/opt/SUNWdat/config
sed 's/Granta/'`hostname`'/' dcgx >tmpdcgx
mv tmpdcgx dcgx
if [ -n "$BRNAME" ]
then
  echo "setting browser launch command to $BRNAME"
  echo "DC-Share.BrowserName: $BRNAME %s" >>dcgx
  NETSCAPE=`echo $BRNAME | grep netscape`
  if [ -n "$NETSCAPE" ]
  then
      # the browser is netscape; we know how to change pages in
      # an already running version of netscape
      echo "DC-Share.BrowserPoint: $BRNAME -remote 'openURL(file\:%s)' 2>/dev/null" >>dcgx
  fi
fi
# Explicitly set up the paths for the trace files
echo "trace.FileName1: $BASEDIR/var/opt/SUNWdat/trc/TRC1" >> dcgx
echo "trace.FileName2: $BASEDIR/var/opt/SUNWdat/trc/TRC2" >> dcgx
chmod 0644 dcgx
#
# finalize the update of the config file
#
installf -f $PKGINST || exit 2
# remove any existing temporary .dcs files in /tmp
rm -f /tmp/.dcs*
exit 0
