#! /bin/sh

# $Copyright:	$
# Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
# Sequent Computer Systems, Inc.   All rights reserved.
#  
# This software is furnished under a license and may be used
# only in accordance with the terms of that license and with the
# inclusion of the above copyright notice.   This software may not
# be provided or otherwise made available to, or used by, any
# other person.  No title to or ownership of the software is
# hereby transferred.

#ident	"$Header: devicemgmt 1.5 89/10/11 $@(#)bnu.admin:devicemgmt	2.2"
#menu# manage devices (list, add, delete)
#help#
#help#	This subcommand allows you to list, add, or delete
#help#	device information.


PACKAGE="Basic Networking Utilities"
DEVICES=/usr/lib/uucp/Devices
INITTAB=/etc/inittab
PATH=:/bin:/usr/bin:/usr/lbin
POLL=/usr/lib/uucp/Poll
SYSTEMS=/usr/lib/uucp/Systems
XDIR=$MENUTOP/menu/packagemgmt/uucpmgmt
cd $XDIR


cmdlist='
	1 list
	2 add
	3 delete
'
flags="-qq -k$$"
trap exit 1 2 15

echo "
This procedure is used to list, add, and delete entries
in the $PACKAGE '$DEVICES' file.
This file contains information about devices
available for calling out using the commands: uucp, cu, and ct.

Type 'q' at any time to quit the present operation.
If a '?' appears as a choice, type '?' for help.

If a default appears in the question type <RETURN> for the default."

while true
do
	CMD=`chkyn ${flags} -fec -Dlist "
Enter the operation you want to perform:
${cmdlist}
(default list)[q]:  " ${cmdlist}`

	case "$CMD" in
	list|1)
		/bin/sh lsdevice
		;;
	add|2)
		/bin/sh adddevice
		;;
	delete|3)
		/bin/sh deldevice
		;;
	*)
		break;
		;;
	esac

done
