:
#	@(#) uulist 23.1 91/08/29 
#
#	Copyright (C) 1989-1991 The Santa Cruz Operation, Inc.
#		All Rights Reserved.
#	The information in this file is provided for the exclusive use of
#	the licensees of The Santa Cruz Operation, Inc.  Such users have the
#	right to use, modify, and incorporate this code into other products
#	for purposes authorized by the license agreement provided they include
#	this notice and the associated copyright notice with any such product.
#	The information in this file is provided "AS IS" without warranty.
#
# uulist -- Make simple uucp channel and domain
#     tables from the output of uuname
#
# IFS="{space}{tab}{newline}"
#
IFS=" 	
"
PATH=/bin:/usr/bin

#
# Configuration defaults
#
LDOMAIN=UUCP
TMPFILE=/tmp/uuchn$$

trap "rm -f $TMPFILE; exit 0" 1 2 3 15

#
#  get the system names
#

uuname > $TMPFILE

#
#  generate the domain file
#

if [ -f uucp.dom ]
then
    mv uucp.dom uucp.dom-
fi

sed -e "s/\(.*\)/\1		\1.$LDOMAIN/" \
	$TMPFILE > uucp.dom

#
#  generate the channel file
#

if [ -f uucp.chn ]
then
    mv uucp.chn uucp.chn-
fi

sed -e "s/\(.*\)/\1.$LDOMAIN	\1!%s/" \
	$TMPFILE > uucp.chn


rm -f $TMPFILE

exit 0
