#! /bin/sh
#
# @(#)setNOTIFYSTYLE	1.3	LPS_UNX_COM	7/25/94
#
# Copyright 1994   Digital Equipment Corporation, Maynard, MA
#
# setNOTIFYSTYLE
#
# A script that produces a value for attribute NOTIFYSTYLE.
#
# Parameters:
#    $1 - LPS class identifier, one of {PC, MC, PS, ENV}
#    $2 - Operating system type identifier (eg: SV2, BSD, etc)
#    $3 - Print client type identifier (eg: AIX, BSD, SV3, etc)
#    $4 - PrintServer printer model (eg: LPS17, LPS20)
#    $5 - Default value for the attribute
#    $6 - Path of the output file to receive the final attribute value
#
# Global variables:
#    ECHON
#    FUNCS
#    PAGER
#    TR    (for the checknumrange() function)
#
# Exit values:
#    0 - Success, output file contains newly set attribute value.
#    1 - Error or interruption occurred, error messages go to stderr,
#	 contents of the output file are undefined.
###

CLASS=$1
OSTYPE=$2
PCTYPE=$3
PSMODEL=$4
DEFVAL=$5
OUTFILE=$6

. $FUNCS   # Import the standard LPS shell functions

if [ "$CLASS" = "ENV" ]
then
   NOTES="
A typical site will choose the default response for this question."
fi

showhelp true "
What method of problem notification should be used?

There are times when a Print Client encounters a condition in which
either the system manager or the requesting user should be notified.
Choose one of the following techniques for problem notification.

    \"mail\"    An electronic mail message is sent
    \"log\"     A description of the problem is entered into the log file
$NOTES"

#list="mail write log"
list="mail log"

choose $DEFVAL "Problem notification method" $list

echo "$RESPONSE" > $OUTFILE

exit 0
