#! /bin/ksh
#############################################################################
#
#   Xreset
#
#   Common Desktop Environment (CDE)
#
#   Configuration file for the Login Manager
#
#   (c) Copyright 1993, 1994 Hewlett-Packard Company
#   (c) Copyright 1993, 1994 International Business Machines Corp.
#   (c) Copyright 1993, 1994 Sun Microsystems, Inc.
#   (c) Copyright 1993, 1994 Novell, Inc.
#
#       ************** DO NOT EDIT THIS FILE **************
#
#   /usr/dt/config/Xreset is a factory-default file and will
#   be unconditionally overwritten upon subsequent installation.
#   Before making changes to the file, copy it to the configuration 
#   directory, /etc/dt/config. You must also update the reset
#   resource in /etc/dt/config/Xconfig.
#
#   $XConsortium: Xreset.src /main/cde1_maint/3 1995/10/03 17:42:10 gtsang $
#
#
#   This file is symmetrical with Xstartup. This script is run after the user
#   session is terminated. Run as root, it should probably contain commands 
#   that undo the effects of commands in Xstartup, such as unmounting directories
#   from file servers. The collection of environment variables that were passed
#   to Xstartup are also passed to Xreset.
#
#############################################################################

#
# This script is run as root after the session terminates but
# before the display is closed...
#

#
#  Update action types for any printers created during the session  
#

if [ -x /usr/dt/bin/dtprintinfo ] 
then
   /usr/dt/bin/dtprintinfo -populate &
fi

#
#  Reset console ownership if local session
#

if [ "$DTXSERVERLOCATION" = "local" ]
then
  if [[ ! -z "$ITE" && "$ITE" != "dtlocal" && -a "/dev/$ITE" ]]
  then
        chmod 620 /dev/$ITE
        chown root /dev/$ITE
        chgrp tty  /dev/$ITE
  fi
fi


