#!/bin/sh
#
# Deliver the name of the current screen object.
#
# Author: Marc S Dye - Sun-ICG - 1999

# @(#)screenname.sh	3.1 02/02/99 Sun Microsystems

##set -x

ME=screenname
			# environment variable defaults
read SUNSCREEN_BASE <${SUNSCREEN_ETC:-/etc/opt/SUNWicg/SunScreen}/location
. $SUNSCREEN_BASE/bin/.ssenv.profile
			# paths within SUNSCREEN_ETC
NAME_FILE=name

NAME=`cat $ETC_DIR/$NAME_FILE`
if [ $? -eq 0 -a -n "$NAME" ] ; then
	echo $NAME
else
	# N.B.: according to Mike Ditto, the value of the 'name' file
	# should be identical to the result of the 'uname -n' command.
	uname -n
fi

# eof
