#! /bin/sh
#
# @(#)setOFFERELOG	1.4	LPS_UNX_COM	02/19/95
#
# Copyright 1993   Digital Equipment Corporation, Maynard, MA
#
# setOFFERELOG
#
# A script that produces a value for the MC-specific attribute OFFERELOG.
#
# NOTE:  This script is *not* designed for use with any class except MC.
#
# 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
#    PAGER
#
# 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

DESCRIPTION="`getobjdesc $CLASS`"

QUESTION="Offer Event Logging Services"

showhelp true "
${QUESTION}?

A $DESCRIPTION can capture PrintServer printer events and other special
information and store it in an associated log file.  The information stored
in the event log file can be useful in troubleshooting printer problems and
analyzing which systems on the network are using the printer.

You can offer event logging services and specify the log file, and then
later disable the services -- while keeping the former event log file
intact -- by simply reconfiguring the Client and answering \"No\" to this
question.  Later, when you wish to continue offering event logging
services, you can reconfigure the Client and re-enable the services by
answering \"Yes\" to this question.

If you do not configure this $DESCRIPTION to offer event logging, then
if any problems arise with the Client, you will not be able to examine
the problem history, since there will be no log file for the Client.
In this case you should temporarily configure the Client to offer event
logging in order to establish a log file, then run the problematic Client
in order to see the logging information.  Later, when the Client problem
is resolved, you can disable event logging for the Client.

When you configure a $DESCRIPTION using the \"step-by-step\" method and
answer \"Yes\" to this question, then you will be asked a number of
configuration questions about other logging-related variables (such as
the name of the log file, logging level, and so on).  If you answer \"No\"
to this question, then all logging-related questions will not be asked.
"

if yesno $DEFVAL "$QUESTION"
then
    resp="Yes"
else
    resp="No"
fi

echo "$resp" > $OUTFILE

exit 0
