#!/bin/sh
# ident	"@(#)ttymuxrc	1.2	98/12/04 SMI"
#
# Copyright (c) 1998 by Sun Microsystems, Inc.
# All rights reserved.
#

BASEDIR=`pkgparam SUNWttymx BASEDIR`
if [ $? != 0 ]; then
	BASEDIR=
fi

PROG=$BASEDIR/sbin/ttymuxadm

datafile=/etc/opt/.ttymuxadm

if [ $1 = "start" -a -x $PROG -a -s $datafile ]; then
	/bin/cat $datafile | /bin/sort | /bin/uniq | while read line
	do
		if [ "X$line" != "X" ]; then
			set $line
			if [ -c $1 ]; then
				$PROG -a $*
			fi
		fi
	done
fi

exit 0;
